I want to physics on a server and i don’t need to use Spatials.
Is it OK if i will just create a PhysicsSpace class and will add PhysicsRigidBody? Instead of using BulletAppState + RigidBodyControl.
If it’s ok, then i have a question: should i use any update loop for PhysicsSpace like in BulletAppState? Or i can just create PhysicsSpace object and everything will be ok for physics update?
@normen said:
Why use your own implementation when you use a normal Application in headless mode anyway? You'd have to care for parallel execution yourself then.
Hey, i have just tried render() method in Headless mode. And it works!
We need multiple physicsSpaces and we will use your implementation. I think we just modify existing BulletAppState for our needs. Thank you.
Another 2 questions:
Is it possible to use PhysicsRayTest only for a certain CollisionGroup? At present, my PhysicsRayTest creates results from all CollisionGroups.
Should I use PhysicsRayTest only in physicsTick() method or i can use the PhysicsRayTest in any place of my code?
@normen said:
2) You should not run it in parallel to the physics update
Thanks. You helped a lot.
The last question: If i use PARALLEL Threading, then where i should use RayTest?
I should use RayTest in the same Thread of the physics update or i should use RayTest in PhysicsTickListener->physicsTick() ? Or i can use RayTest in Main Thread?