HoverCraft Using BodyThrusts?

Hey there! I’m trying Hovercrafts using BodyThrusts (used BodyPositions successfully), as BodyPositions don’t give the tilting effect on slopes, as I found out.

So I tried something.

Here’s the code.
https://ghostbin.co/paste/3qk47

Here’s what happens:

https://gyazo.com/9389154942b537c22d6f872569d55fbb

https://gyazo.com/9389154942b537c22d6f872569d55fbb

Now, I suspect it’s Center of Mass that’s spoiling everything here, but I have no idea.
Also anyone got ideas on how I can add some friction to the movement? If I push the thing and get on it (in the videos above), it kind of drifts in that direction non-stop.

EDIT: uh also the shaky movement is because im using gyro on just 10 D, ignore that for now :slight_smile:

uhh did you try to say something? :smiley:

I was thinking before that one problem with your thrusters is that they only provide a force straight up.

To make it more realistic, what you should do is take your raycast result and get the .Normal value of where it hits, which is the vector perpendicular to the surface, and apply the thrust in that direction.

Those should be applied equally to your two thrusters in the front and back which should be acting as the main ‘hover’ mechanic for your bike.

You should also apply 2 smaller thrusters, one on each side in the middle, which respond to steering and will fire in the direction of the turn to make it lean.

Try those and let me know how it goes!

can you explain a little more about the first line you said? How is .Normal different?

Yeah you may well be running into CoM issues. A way of getting round this is to make the player and the visible parts of the bike massless and just have a basic invisible part welded to the bike that has mass. This way you can set the CoM perfectly where it needs to be.

You mentioned a gyro, is that to keep the bike upright (roll control)?

I don’t think that the normal to the surface would produce the right behaviour. All the thrusters should be doing it providing a force directly away from the bike, perpendicular to the floor of the bike. That has nothing to do with the surface that the bike is above. A helicopter doesn’t flip over when it flies over a hill.

For slowing down the bike I’d say you’re probably best off using a bodyforce that applies a force in the opposite direction and proportional to the velocity of the bike. (F = -bv) You can change the constant of proportionality ( b) to change how quickly the bike slows down. This is like a viscous type of force rather than drag though.

No, but a helicopter’s behavior is different from that of a hovering bike that is just a short distance from the surface.

correct. The gyro keeps it upright. Also thanks for the idea of the massless and center invisible part, this way I could find the points of wheels with an offset :smiley: