My newton bodies aren't updating and my callbacks are set up correctly!

From Newton Wiki
Jump to: navigation, search

Remember two main things:

  • Update the newton world in your main game loop.
See NewtonUpdate
  • Also, ensure the Newton world size is large enough for your object positions. The default world size is 100x100x100 units. Don't make the size arbitrarily large as this will only decrease the performance, make it around two to three times larger than the size of your physical scene.
If your objects worked in 1.32 and stopped working in 1.5, this is almost certainly the reason for your trouble.

Also note that the force and transform callbacks of static objects (i.e. mass == 0) will not be called, so you should position any visual representations manually.

See NewtonSetWorldSize, NewtonSetBodyLeaveWorldEvent