Hover vehicles?

So. I am wondering about how you would make a hover vehicle with the same physics like in Wipeout or F-Zero. I was thinking about using a car tutorial and turning the wheels invisible, but, is there a better way?

My best guess would be to have an invisible cube under the craft, but that would be kind of unrealistic…

Ya. I think the invisible wheels would work, but then how would I make it skid and tilt while turning?

Heres the tutorial I’m using.

Just tweak the physics of the bullet car demo. Maybe set the friction of the ground really low.

Nope, changing the friction didn’t work. Unless I did something wrong, which is entirely possible.

You need to change the friction on both the ground and the wheels. Changing the friction on one will do nothing (unless dramatic changes) Set the friction of the wheels to 0 and adjust the ground to your liking. Also set the walls and the vehicle’s restitution up, so it bounces when it hits, stimulating a high speed hover crash.

you can do this with the new apricot actuators… there is a demo floating around this forum somewhere made by Ben2610

Ok but that wont work very well with jumps. It just follows the ground.

And I still can’t get the friction to work. I don’t know why.

Wild guess here. Maybe you should use logic bricks:

always------and-------motion (add a global force to the z axis…or up :stuck_out_tongue: )

You would have to balance out the gravity of the game and the amount of force pushing the object upwards.

Just triede with a force on z-axis at 9.8, just as the gravity is, and the cube didn’t move at all
Dunno if this serves your game

EDIT: only with a mass on 1

Well I would like jumps, so it would need to fall back down after it goes up.

This used to be possible pretty easily with the FH force. Last I checked, though, that stuff wasn’t working (found in the Materials buttons under DYN).

What you need is some sort of spring-like upwards force. This would have to be done with python. I made a very quick blend file explaining spring physics and how to apply them in Blender.


basichovercraft.blend (135 KB)

Ok thats cool, but is there a way to make it so that I can have it dynamic and bounce around, but after a bit it would line up the right way to the ground so that it can drive again?


The tires on the car are just window dressing. They don’t actually exist. Kind of like a hologram.

Replace each tire object with an empty. Treat each empty as if it was a tire. Give it the same radius, friction, etc that you would a tire.

Or you can go into edit mode and delete the tire object vertices, leaving just the object center.


Oh well I just set it to always invisible.

What I’ve done is to constantly apply an upwards force on a dynamic object. You’d get something like this:

if groundIsTooClose: #I would suggest a -Z ray sensor
  move.setForce(0,0,massofobject*19.6,0) #19.6 is double gravity

The thing is, the above code can be a bit “bouncy”. If you don’t like it, you’d want to lessen the force the farther away from the ground the object is. Try this:

pos = own.getPosition()
gpos = groundsee.getHitPosition() #assuming -Z ray sensor
dist = pos[2]-gpos[2] #gets the current height
maxdist = 1.5 #maxdist is the how high above the ground you want the object
pushstrength = maxdist/dist*9.8*massofobject #this formula says that if the object is at optimal height, push with the force of gravity, otherwise push harder
pushlimit = 19.6 #this and the first "if" below prevent the object from rocketing upwards if very close to surface
if pushstrength > pushlimit:
  pushstrength = pushlimit
if dist <= maxdist: #doesn't apply any force if the object is too high

Will that still allow it to jump off ramps?

I don’t see why not. The object only pays attention to the ground when it’s close enough, so flying off a ramp will cause normal physics to prevail until it “lands”.

However, there may be some difficulty if the object flips over, since it uses a -Z ray to see the ground. I guess you could use a collision sensor: if the object is touching the ground yet it can’t see the ground through the -Z ray, it flips upright.

Ok, that would be cool if it flipped when it hit the ground, that would make it more like a racing game.