So I take the opportunity and quickly wrote few 'high-level' components to imitate Unity's Physx implementation rigidbody component and succesfully run Physx simulation on another thread.Īnd here comes my other question - because I see it's nicely protected from race conditions when tried to use this api from both threads simultanously - is there chance to make it thread-safe? Im asking because I'd like to run Physx on own dedicated thread, and logic in other, but still being able to communicate between them without forced thread synchronization.Īlso are you going to support some layer system for collisions and raycasts like Unitys implementation? Because from what I can see it's not something trivial that can be done in few hours. Yup, finally got some time to play with this new implementation, and I must admit I love this 'low-level' api approach, feels like such a relief, like this is how Physx should be integrated by Unity from the beginning, Unity should take notes. The simple way-just take the position of your rigid body and set it to your game object. Though, to make it efficient and don't create all this bone game objects, one will need to write a custom skinning shader and pass rigid bodies positions there directly. That's the idea.Īs for SkinnedMeshRenderer-you just move the game objects used as it's skinning bones. I'm implementing single-body actors (for simple static and dynamic rigid bodies), as well as multi-body actor (for articulation), as well as the possibility for user to create custom actors with multiple rigid bodies and joints inside. In the PhysX Component System (PCS) I'm currently working on. To have bigger number of rigid bodies on the scene, the particle-system-like approach should be used-single game object should spawn multiple rigid bodies, and then use their positions to draw something on the screen. That should work well if the number of rigid bodies is few.īut-while PhysX can easily simulate 10K+ rigid bodies-updating 10K+ game objects will be too expensive. Click to expand.The simple way-just take the position of your rigid body and set it to your game object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |