-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not a issue with your code but a issue with me #1
Comments
Hi there. I'm afraid my code probably won't be very good for a racing game. It uses AABB collision, which means all the walls have to be either 0, 90, 180, or 270 degrees. You can't have any 'diagonal' walls. So it's good for a maze game, for example. |
Hello, Thank you for the reply back. What if I put like a transparent say wall around the whole track. would that work? joseph |
Yes, sure - that would stop people leaving the raceway entirely. But it's not going to stop people coming off the track at individual corners (i.e. going 'on to the grass') and you wouldn't be able to use it for track barriers around certain corners (as they would need to be placed diagonally). But it would be fine for barriers along the straights and/or the pits/stands (as they can all be axis aligned, I imagine). |
I have walls that are the same as the whole track. I took them out because it looked funny to me. It covered the whole track. The track is in the sky track. I can put the walls back and make them transparent. So it will cover the whole track on both sides. Joseph |
Hello. Do you have a example on how to not walk through walls. I' having a hard time setting up your code please? Edit: This is what I have.
Can you tell me what I'm doing wrong. I'm sorry I'm new to all this. I have a border around my whole scene. Joseph |
Hello is this correct? `a-curvedimage class="wall" src="border.png" radius="500" position="300 20 0" theta-length="360" height="4" rotation="0 0 0" opacity="1" side="double" scale="10 10 10"> a-entity camera reset-on-collision="with: .wall" look-controls wasd-controls="acceleration:200" position="160 20 -50"></a-entity` |
You can't use 'curvedimage'. Use plane instead. |
Not sure how to make a Plane around the whole scene so no one can go off the edge? Sorry I'm not very good at coding. It is what I found online and modded to add to my own scene. |
You'll need at least 4 planes. One for each edge. Look at my example of a 'back room' of a house |
The wall must be AABB. So rotation of 0 0 200 isn't good. Look at my example. Everything is 0 90 0 or 0 180 0 or similar. |
Hello I can not find a example But a art gallery one and That for some odd reason doesn't load. I change the rotation. However I can still not load the scene it comes up blank for some odd reason. |
It's not a standalone example. It's a bit of code from an art gallery project I wrote. But you can see it has planes for walls and a moving player. Just copy the planes for the walls and the player and put it in a project of your own. You should see the collision detection. |
Can you please give me a link? Because I can not find it or the example code? |
Hello, I did follow your wall. But the whole scene will not load now. If I take out the plane wall then The scene loads with no problem. |
My code contains some things (like 'mixin') which you'll have to remove. Look up a tutorial on how to use a-plane. |
|
|
|
|
Paste the code (not a screenshot) so I can copy/paste |
It will not let me paste whole thing. So i uploaded to pastebin. https://pastebin.com/aeKL92Zu |
I do not know why It is blank. If i take out the wall your plane for the collision part I can load the aframe with no problem. Edit: I also put your reset-on-collision in the main area of the index.html page. |
It works fine for me. I'm sorry I cannot help your further. |
Let me load this to my hosting and see if it works. |
OMG I can not believe it works in my godaddy hosting but bot in my localhosting. I wonder why is that? Thank you so much for the help. |
CORS, probably. Check your JavaScript console. |
Yup there is something there. I totally forgot to check that.
|
I just fixed that for you. Get a fresh copy of |
Hello, I have one question. Would this work for a building to stop walking through the wallsbut Still can let the person walk through the door? Joseph |
Yes |
Do i apply it the same way? I have a OBJ building with MLT texture images. Joseph |
No that won't work. It would have to be a building constructed manually out of planes. Or you could probably use a OBJ and put invisible planes around it. |
The building i have and found is from here https://www.cgtrader.com/free-3d-models/exterior/industrial/modular-warehouse Joseph |
Okay, I hope I can try tis. Thank you Joseph |
Hello just a update. Everything is working great in local. however If i push my way through the red or blue wall I can get through If i keep pushing on the up arrow key. I just wanted to let you know. Joseph |
Hello kennard, I'm sorry I have been away dealing with family and my depression. But I'm back at dealing with this whole walking through the wall problem. I have tried your demo. If I keep trying to walk through the wall. It keeps pushing me back. However after I keep pushing through it I can get through the wall. Is there a way to stop that? Joseph |
Hello I'm not very good with coding but there is my problem. I have a track for a game I'm working on. I'm trying not to go off the track. I searched online and trying to find a way not to go through walls or off track. I found your github page. Would this help me and do you have a example i can take a look at please? I tried your code but I got a little confused trying to set it up with my aframe.
Joseph
The text was updated successfully, but these errors were encountered: