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 » Tue Mar 31, 2020 3:50 am

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: 4884
Joined: Tue Jul 04, 2006 4:45 am

Re: Make a Object not collidable temporarily

Post by Norbo » Tue Mar 31, 2020 8:08 pm

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 » Wed Apr 01, 2020 1:37 am

Thanks :D

Post Reply