jaipack17 / Nature2D

A 2D physics engine for Roblox. Create versatile physics simulations and mechanics with GUIs!
https://jaipack17.github.io/Nature2D/
MIT License
147 stars 8 forks source link

CanTouch Property for RigidBodies. #19

Closed jaipack17 closed 2 years ago

jaipack17 commented 2 years ago

Regarding the possible addition of the new CanTouch property for RigidBodies.

At present each RigidBody has a Collidable property which is a boolean. This property determines if collision detection will be processed for the rigidbody and if .Touched, .TouchEnded and .CanvasEdgeTouched events will be fired.

Each frame when collisions are detected and processed, any Rigidbody whos Collidable property is set to false will be ignored. The idea of CanTouch is to detect collisions between the RigidBodies even if Collidable is false. If two RigidBodies collide, and either or both of them have their Collidable property set to false but CanTouch as true, .Touched will be fired but no separating/collision response force will be applied to them. This also relates to .CanvasEdgeTouched. Even if KeepInCanvas is set to false, .CanvasEdgeTouched will still fire but forces to keep the RigidBody inside the canvas won't be applied.

There are a few concerns and questions which emerge with such a change. So before adding this functionality, I'd like to hear from you on these points.

So I'm pretty sceptical about this addition. Though it may be deemed helpful to many because of how convenient and easy collision detection for Non-Collidable RigidBodies will be. Would this property be useful? Let me know if you have any questions, feedback or answers.

github-actions[bot] commented 2 years ago

Looks like there hasn't been much activity going on here! In order to prevent clutter and purge inactive issues, this issue will be closed if it remains in the state of inactivity. If your issue has not been solved, you can open another issue to address your query! Be sure to format your issue correctly to help us review and process your issue faster!