#How can I temporarily disable collision with Rapier?

9 messages · Page 1 of 1 (latest)

maiden cape
#

I want to basically enable noclip temporarily. I still want to be affected by forces, so I can't change the RigidBody variant on my player. I thought about removing the Collider component temporarily, but then I would have to hard code the size of the collider in 2 places so that I could bring it back afterwards (I think). Any alternatives?

pure jay
#

could make it PositionBased for the rigidbody

#

then you could just have a bool to see if noclip is enabled or not

#

or

#

you could add a method to your player struct

#

that returns a collider object

#

that way you could add/remove it by just going

#

playerStruct.get_collider()

maiden cape
#

putting the collider in a method makes the most sense, probably shoulda thought of that, thanks