- Home /
How to stop a zero-gravity craft from going up walls..
Hi,
I'm having trouble with this tidbit.
I have a working zero-gravity hovercraft which moves and controls exactly how I want it to.
I want to make a racing game using this craft so I would need it to stick to a certain track.
The issue I'm having is, every time the craft comes to a wall or barricade etc, it turns and makes that wall it's base and begins moving up it.
What I want is, if it hits a wall, just to have a sort of ' bash' collision where it slows down and turns to the road like a racing game. But the physics I'm using to keep the craft hovering is contradicting with this.
The game would be very similar to wipeout so knowing how they would have done their physics would be a big plus..
My question is.. when my craft hits a wall, how would I stop it from climbing it and make it not turn or anything just sticking to the track?
Thanks in advance
Won't be very easy to answer this if you don't post at least part of your hovering code.
It seems like you have a system where the vehicle has some transform or mesh registered as it's "ground", and moves relative to that. If the problem is that the system hits the wall and sets it to be the "ground", it should be pretty easy to fix your problem.
Simply add a tag to whatever you want to be the ground a vehicle can move over, and check for that when you're assigning a new ground. Have whatever your track is have that tag, and don't put that tag on the walls.
Your answer
Follow this Question
Related Questions
Punching a crate 0 Answers
Imported 3D models collisions 1 Answer
FPS Tutorial: Why do my grenades go through the walls? 3 Answers