saharan / OimoPhysics

A cross-platform 3D physics engine
MIT License
863 stars 68 forks source link

about raycast #38

Closed lo-th closed 2 years ago

lo-th commented 3 years ago

Hi Saharan, A great option for raycast is add a mask if possible world.rayCast( begin, end, callback, mask = 1 )

to pass through object

lo-th commented 3 years ago

other extend is trigger for rigidbody

RigidBodyType / var _TRIGGER = 3 trigger return collision but have no physics existence very useful for game

saharan commented 3 years ago

Currently collision queries in World detect all overlaps and call callback functions for each overlap. This gives the full functionality as users can filter shapes in their callback functions, but providing filtering masks may make it more useful so I could consider adding it. What I concern is adding another kind of masks would make the API complicated; masks for collision filtering is necessary, but for queries masks are not necessary as I described above.

Adding shapes just for triggering is mentioned in #34, I think it's very useful too. I'm planning to add a flag to Shape so that users can attach a trigger shape to a dynamic rigid body.

lo-th commented 3 years ago

i'm testing collision i see little error in RigidBody.tx line 955 getNumContectLinks i guess is getNumContactLinks

saharan commented 3 years ago

getNumContectLinks → getNumContactLinks

Thanks! I hadn't noticed it.

saharan commented 2 years ago

Triggering feature will be handled in #45