Hovercraft Physics?

I’m making a third-person vehicle game where the player drives around in a little pod vehicle that hovers a few feet off the ground. Right now it’s a static mesh that’s been parented to a capsule component (it’s based on the default character blueprint), and it works just fine in that regard, but I’m trying to get it to do two things:

  1. The more important of the two, I’m trying to get the vehicle to have physics. So if it hits a wall, another vehicle (it’s a multiplayer game), or anything else, it will bounce off realistically. Right now it just stops and doesn’t do anything until I turn and move in a different direction. I’ve tried checking the enable physics box, but that just causes the vehicle mesh to fall to the ground and sit there while the rest of the controller is free to move around without it.

  2. Ideally (though less importantly), get some sort of suspension-like behavior between the vehicle and the ground, so it bounces a bit as it goes over noise in the terrain, or possibly even bounces slowly in place when it’s not moving.

I’m guessing the best way to do this is get rid of the capsule component and get the physics-enabled mesh to hover above the terrain and stick with the controller, but I’m not sure how to do this (or any other methods of getting this to work). I also thought it might be possible to constrain the vehicle to the capsule via spring arm, but that seems to only work for cameras. Any suggestions?

I’ve also experimented with physics thrusters, but those seem to be out of the question. The vehicle mesh is an animated skeletal mesh that has some moving wing components on the sides, and those tend to get ripped off when I use thrusters.

Two possible starting points for you, if you have not already discovered the pages on the documentation:

https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehicleUserGuide/

and for the content side of things:

https://docs.unrealengine.com/latest/INT/Engine/Physics/Vehicles/VehcileContentCreation/index.html

When first adding your FBX file you need to open up the Physics Asset then delete all the bodies which are created automatically. Then you can create new bodies, such as a box, sphere etc. Please remember to set the body covering the vehicle chassis to Kinematic and the same for any wheels. This is in the documentation and should fix your problem with the physics displaying undesired results.

Also epic has a bit more about setting up vehicles on their youtube channel.

Sorry about the general advice, but often I find the simplest solution to usually work best.

All the physics asset parts are not tied to the vehicle class. So for your purposes, you could try fixing the physics asset, then using that in your character blueprint. Try using a skeletal mesh rather than the static mesh, as it will help you create the desired behaviors.

The problem with all that is that I’m doing this all using an extension of the character blueprint, not the vehicle blueprint. Technically I could shift everything over (this is just a prototype, I’m going to have to do that when I bring everything into the actual game anyway), but I have some functionality like low friction built into the character movement blueprint, and I don’t have the slightest idea how to reprogram all of that into a vehicle blueprint.

It is a skeletal mesh. The issue isn’t with the mesh itself, it’s with how to get the blueprint as a whole to behave as if it has physics while remaining under player control (i.e. moving with the controller at a fixed height and not just falling to/through the ground). So far I’ve tried enabling physics on the mesh, enabling physics on the capsule component, constraining the mesh to the capsule with a physics constraint, disabling gravity on the capsule with physics enabled, and straight up faking physics collisions by imparting force on the vehicle inverse to an impact point in the event graph, none of which have worked. I’m looking for other potential solutions.

Hey ) I’ve been facing the same kind of problem recently, and i was trying this and that. The thing i don’t like about not using the character blueprint and using just physics model is the amount of the control. It’s hard to control physics model a bit so i came up with another solution so far. Maybe it will help you. Check out my post in here

Regarding the collision bounce it’s just eh matter of adding impulse on an impact with direction of the impacted surface normal. No a big deal to add in that case.

P.S. I’m using the skeletal mesh for the car aswell.

You will definitely get rid of the character controller and build your own controller to simulate the hovercraft. There are a couple of routes to go with the hover craft physics.

  1. Use wheel collides with very loose suspension
  2. Build a hovering component

1 is the easiest if the hovercraft is mostly going straight’isn since you drive it like a simple dune buggy.

That said the physics simulation for a hover craft shouldn’t be to hard. You have an array of sample points over the hovercraft’ skirt where it meets the body. You do a ray trace to the ground and apply a force at the sample point position proportional to the height. In effect its a spring system (like a loose suspension). Thrust is then applied via the rear motor angled by whatever direction you are holding.

This means there is nothing in contact with the floor and thus it’ll slide sideways etc.

Check out the physics tutorial if the new game space dust. Michael created a good run down on how to create the suspension your looking for