Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Recommended Posts

You can see in the file "Leadwerks\Include\Classes\Drivers\Physics\NewtonDynamics\NewtonDynamicsPhysicsDriver.h", that the PhysicsDriver has a reference to the collisionWorld, which is a NewtonWorld pointer. You can get the current physics-driver from "_currentPhysicsDriver" but you need to cast it to a NewtonDynamicsPhysicsDriver, thus:


should be the droid you're looking for. (I haven't tested this but I am fairly certain, this will work)

  • Thanks 1
Link to post
Share on other sites
  • 4 weeks later...


Thought I'd update this here too, the above code doesn't get the correct newton world.  The code below does;

NewtonWorld* GetNewtonWorld()
	auto _world = World::GetCurrent();
	auto _simulation = (NewtonDynamicsSimulation*)_world->simulation;
	return _simulation->newtonworld;


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...