Havok RaycastVehicle

A quick port of CannonJS’ RaycastVehicle just to fuck around
It’s using curves to control acceleration and slipping. Those curves are attached as animations to the curves node in the inspector, so they can be viewed and edited using ACE


This is so good!


I’m new to game physics and BabylonJs in general but reading that code I got the feeling all car physics is applied with pure JavaScript and Havok features related to vehicle physics are not taken advantage of.

Am I wrong? (By the way kudos for providing that even if it’s only vanilla Js)

If I am correct with that assumption I hope the team provides documentation for Havok side of things.

Nice work!

We have plenty of documentation regarding physics and havok :slight_smile: Using A Physics Engine | Babylon.js Documentation (babylonjs.com)

@carolhmj I’m reading it right now and learning but I only see one chapter about Havok, which is for using the provided plugin. If I remember correctly (again I am new to game physics world) Havok has modules for fine tune vehicle dynamics (among other things) such as gearing, engine parameters, aerodynamics etc.

By documentation I mean that sort of information if available.

Edit: Also most of the classes and methods defined in the above playground for raycast vehicle system should be available in Havok. If I understand correctly what we have in terms of Havok with Babylon plugin is the general side of physics simulation system, with high performance. Am I mistaken?

Not all of Havok’s capabilities are available currently, we focused on rigid bodies for 6.0. But if there’s interest we can talk to the Havok team to add more :slight_smile:

Yes please :two_hearts:.

Above playground has about 1000 lines of code and I guess this could have been reduced to few dozens (or a hundred?) if we could take advantage of native Havok vehicle physics module.

I’ve open an issue to keep track : [Physics] Car/Vehicle controller · Issue #13800 · BabylonJS/Babylon.js · GitHub