Vehicle wheels don't appear in VDB(Movie included)!

Vehicle wheels don't appear in VDB(Movie included)!


My vehicle slide and i can't control it, for debugging i'm using VDB but it don't show my wheels! (Selecting Virsual Debugger->Viewer->Vehicle menu don't do anything and just mesh shapes appear in vdebugger)

I did copy all vehicle setup codes without any change from "Havok\Demo\Demos\Physics2012\Api\Vehicle\Car\CarDemo.cpp" but only the Havok demo wheels appear in the VDB not my application. 

Also my VDB initializer  is :

			// Initialize the VDB
			hkArray<hkProcessContext*> contexts;

			// <PHYSICS-ONLY>: Register physics specific visual debugger processes
			// By default the VDB will show debug points and lines, however some products such as physics and cloth have additional viewers
			// that can show geometries etc and can be enabled and disabled by the VDB app.
			hkpPhysicsContext* context;
				// The visual debugger so we can connect remotely to the simulation
				// The context must exist beyond the use of the VDB instance, and you can make
				// whatever contexts you like for your own viewer types.
				context = new hkpPhysicsContext();
				hkpPhysicsContext::registerAllPhysicsProcesses(); // all the physics viewers
				context->addWorld(physicsWorld); // add the physics world so the viewers can see it

				// Now we have finished modifying the world, release our write marker.
			hkVisualDebugger* vdb = new hkVisualDebugger(contexts);

			// Set the local pointers
			mVisualDebugger = vdb;
			mContext = context;


Thanks for any help


Download wheel_problem.zip352.99 KB
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


I believe the issue you’re having with controlling the car is due to the fact that your world’s up axis appears to be different than what the demo expects.  To fix this you may want to modify this line

data.m_chassisOrientation.setCols( hkVector4(0, 1, 0), hkVector4(1, 0, 0), hkVector4(0, 0, 1));

in the function VehicleSetup::setupVehicleData in the VehicleSetup.cpp file to reflect your world's coordinates. If that doesn't work for you, you’ll want to try and re-orient your assets to match the physics world (from Y up to Z up or vice versa), to fix your steering issue. 

In regards to the issue you’re having with the wheels, it appears that you set up the Visual debugger correctly in your code.  In the VDB, have you enabled the Vehicles option from the Viewers drop down menu? To confirm this, you should be able to set a breakpoint in the hkpVehicleViewer::postSimulationCallback function, and see if and when that function is called once the VDB is running. Note that, to enable debugging on source that doesn’t match built libs (as will be the case here), in Visual Studio, go to Tools>Options>Debugging and make sure that the box "Require source files to exactly match original version" is unchecked. 


Leave a Comment

Please sign in to add a comment. Not a member? Join today