4.5 vehicle strange jump

Hi,
from time to time when I’m driving a vehicle through obstacle the vehicle suddenly changes orientation. I was able to reproduce this issue in the Vehicle Sample.

I tried to mark down cause of this issue through debuggger at functions:

setAngularVelocity

setLinearVelocity

addForce

addTorque

setGlobalPose

setCMassLocalPose

None of these functions were fired during debugging, so they aren’t problem here.

I also tried to increase velocity interation count(8) setSolverIterationCounts, problem still exist.

Limit to 5.f setMaxDepenetrationVelocity doesn’t solve the problem.

FPS is stable 120 fps.

Enabling/disabling physics substep doesn’t solve the problem.

Tweaking wheels SuspensionDampingRatio / SuspensionNaturalFrequency doesn’t solve the problem.

Distribution of spring forces from left spring to right and vice versa with stabilize bars doesn’t solve the problem.

http://projects.edy.es/trac/edy_vehicle-physics/wiki/TheStabilizerBars

Funny thing because for the most of the time vehicle behaves normally.

Good frame:

Bad frame:

PVD Debugger session, take a look on the 2933(good) frame and 2934(broken).
https://dl.dropboxusercontent.com/u/21800167/vehicle_jump_2933-2934.pvd

Object to observe:
PxPhyscs->Scenes->PxScene[2]->RigidDynamics->Component: Sedan_C_8.VehicleMesh Sedan_SkelMesh Bone: Vehicle_Base

I can even send to you guys whole project with this obstacle, but this is simple box a little narrower than length between front-rear wheels.

I’m thinking that the problem here is spring force applied to vehicle body, but I don’t know how to check this and how to fix this:( Maybe I should wait for physics 3.3.2 ;(

Best regards

Hey -

Could you describe a little more what you’re seeing? Do you mean the rotation of the vehicle changes when you drive over an obstacle? What kind of obstacle are you driving over that this is happening?

Cheers

Hero You go:

Obstacle: https://dl.dropboxusercontent.com/u/21800167/obstacle.png

And movie:
https://dl.dropboxusercontent.com/u/21800167/UE4Editor%202014-10-30%2015-53-43-41.avi

Check at 5s or 16s.

Hi,
I think I see the basic problem here, not quite sure what to do about it yet. Looking from above, it is clear that the right-rear tire contacts the obstacle a few frames before the left-rear tire at frame 2933, and the first raycast contact of the right-rear tire on the obstacle is on the front edge of the obstacle (which apparently isn’t quite vertical), not the horizontal surface of the obstacle (the long, thin, blue triangle where the ray intersects the obstacle):

In frame 2934, the right-rear tire raycast now encounters the horizontal surface of the obstacle (the big, fat blue triangle where the red ray intersects the obstacle:

In all of the other frames where the car first contacts the obstacle, the first raycast hits the horizontal surface, not the vertical edge. I believe that the suspension is reacting harshly to the normal produced by the raycast with the leading edge of the obstacle at frame 2933. I would try to filter that out somehow.

I would filter it too, but don’t know how and I don’t think this is even possible without Physx sources;)

I somewhere that in 4.6 will be physx 3.3.2 which will bring some fixes in vehicles.

This thread is also interesting Horrible Car Physics - Feedback & Requests - Epic Developer Community Forums

<=4.5 broken COM :slight_smile: