Make a Object not collidable temporarily

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
starlaoxmelgs
Posts: 15
Joined: Mon Jan 13, 2020 8:26 am

Make a Object not collidable temporarily

Post by starlaoxmelgs »

I add a BEPUphysics.Entities.Prefabs.Box to space
So it can collide with other objects.
But sometimes I want to make it not-collidable, after 3 seconds, I need it collidable again.
What's the proper way to do this?
Add to space, remove from space works, but just weird.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Make a Object not collidable temporarily

Post by Norbo »

You could use collision rules, but having an object in the Space doing nothing comes with a slight performance penalty that simply removing it avoids.
starlaoxmelgs
Posts: 15
Joined: Mon Jan 13, 2020 8:26 am

Re: Make a Object not collidable temporarily

Post by starlaoxmelgs »

Thanks :D
Post Reply