Both the Dojo and Light Mapping examples show how to setup and use collision / physics in SunBurn - and also how to spawn objects that are controlled by players.

The setup is relatively easy: make sure to add the SunBurn physics assembly to your project, then use the SceneInterface.CreateDefaultManagers() overload that accepts a collision system type (Physics or LegacyCollision).

You can then set each scene object's collision type to be collideable, to trigger events, or to be ignored by collision / physics (the default).

chenmark:

I'm not getting the event fired at all.

Make sure to move the object(s) using the CollisionMove.ApplyForce() methods, these apply motion to the object and activate it. Setting the World transform directly bypasses the collision / physics and may not trigger an event (if the object is at rest).

Also make sure the UpdateType for the objects is set to Automatic - this ensures the objects are dynamic and receive events from the engine.

You can calculate bullet collision using the ICollisionManager.RayCast() methods. Instead of making the bullet objects themselves collideable, use the RayCast to see if the bullet will hit anything during that frame and either move the bullet to its new location or distribute damage as needed.

Okay, so how can I do physics while still assigning world transform. Because, if I don't assigne the worl transform then I can't scale or rotate my entity. But if I do, physics doesn't work. I wish there was some kind of MoveTo feature with the new physics system.