Vehicle jumping

imagine a fun game that you press space bar and your vehicle jumps. what do you do to make it with blueprints? which blueprint you use? velocity, impulse, teleport and why? what setting in wheeled vehicle you change?
thanks for your help and patience ; )
oh i almost forgot, its important that vehicle lands on the wheels :smiley:

If you’d like to set up a simple, fun vehicle and bypass the (maybe) complex built-in vehicle setup… here is a REALLY good overview of the main concepts Space Dust Racing UE4 Arcade Vehicle Physics Tour - YouTube

If you combine it with this one… UE4 How to make Car Vehicle Wheel with Suspension using Physics in Unreal Engine 4 Tutorial - YouTube… you may have something really fun to play :slight_smile:

To jump, use something like a jump event triggered by the space bar and use AddImpulse in the upward (or upward combined with forward direction/velocity) of the vehicle. If you’d like to get really elegant, driven by a timeline, you could charge your jump by compressing your suspension and AddForce driven over a short period

(sorry, I know some of this stuff might be a bit advanced… but someone might find it useful too)

thanks dude, its almost familiar but i have nothing to know about Addforce and i’ll check it in documents. now i’m gonna test your guide when its finished i upload the screenshot here :wink:

Honestly, I’d maybe suggest making sure it works locally first… physics in multiplayer adds another layer of complexity and unknown factors. I’m literally doing exactly this myself on my own project.

Try lowering your Center of Mass offset in the component that is simulating physics… (1 unit = 1 centimeter, maybe start with -100 cm in Z) a lower center of mass will help your vehicle to right itself in the air yet still look alright (GTA style).

I’d also reduce the Linear and Angular Damping settings there too (it will slow down momentum speed and spinning). For a start, set both to 1 or 2.

I’m fairly sure that using GetActorLocation will likely give you incorrect results. Depending on your game design, you might consider your actor’s GetForwardVector, or GetUpVector or some kind of combination.

AddForce, AddImpulse and AddTorque all usually need BIG numbers (starting at like, 10000) to make a difference… because they include the mass of the actor. (on the physics simulating component)… unless you tick VelChange on the BP node.

The above nodes act on the center of mass (or maybe the pivot) honestly, I forget which. Also, I’d advise that you check the location of the center of mass (UE4 might’ve calculated it to be off-center if your simulating component collision is asymmetrical. Also, maybe don’t use AddForceAtLocation unless you really know why you are using it

thanks to aNorthStar i created it and its like this

so when i hit space bar its calling vehicle jump event (it runs on server because of multiplayer replication stuff). its working but still has a little spinning in air and lands on the roof one of ten times. (lands on wheels 9 times too). i locked x and y axis in vehicle mesh and it worked but that seemed so terrible so is there any other way?

hey pal sorry for late, i created it with a combine of GetUpVector and GetForwardVector and 25 vectors of the Z axis. and it worked better but there was spinning when the car was steering around and i’ve been pressing space bar. so i changed center of mass and that got harder (the vehicle was dancing great) so i changed many other things and it didnt work. then i went to blender to see the model and measure dimensions to calculate the center of mass and finally it really worked nice on Z axis -40 , thank you so much for the help, cheers.