Vehicle sinks in the ground, then the simulation crashes

Vehicle sinks in the ground, then the simulation crashes

n3xusslo's picture

Hello, I've just picked up havok and now I'm stuck at this vehicle demo-it's the Vehicle Api default demo (hk650r1\Demo\Demos\Physics\Api\Vehicle\VehicleApi)

Here's what happens: when the wheels touch the ground, the vehicle start to roll and it sinks a bit into the static box, then the simulation crashes. If I place the vehicle atop a dynamic box, it looks like the box gets glued to the car and becomes unstable, it starts to float etc... If the vehicle is dropped on its roof, so that the wheels aren't touching the ground, everything runs just fine. I've copy/pasted all the code for the vehicle setup after I noticed this error (all the suspension parameters, etc), but it still doesn't work. I've attached the hkpVehicleInstance xml file and the Visual debugger movie. Callstack: GameV1.exe!hkpMotion::setAngularVelocity(const hkVector4 & newVel={...}) Line 127 + 0x72 bytes C++
GameV1.exe!hkpVehicleInstance::applyAction(const hkStepInfo & stepInfo={...}) Line 695 C++
GameV1.exe!hkpSimulation::applyActions() Line 666 + 0x46 bytes C++
GameV1.exe!hkpSimulation::integrateInternal(const hkStepInfo & stepInfoIn={...}) Line 602 C++
GameV1.exe!hkpSimulation::integrate(float physicsDeltaTime=0.016733132) Line 142 C++
GameV1.exe!hkpSimulation::stepDeltaTime(float physicsDeltaTime=0.016733132) Line 344 C++
GameV1.exe!hkpWorld::stepDeltaTime(float physicsDeltaTime=0.016733132) Line 2319 + 0x12 bytes C++
----> GameV1.exe!NX::Physics::Run() Line 126 C++
GameV1.exe!Realtime() Line 65 C++
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
n3xusslo's picture
I've found the problem: hkpVehicleDefaultSuspension::m_wheelSpringParams[i]::m_dampingRelaxation was not set at all.

Login to leave a comment.