Hi there,
If I set IsActive to a physical entity what does it happen? It stops being considered in the physical space for collisions, gravity and so on?
In that little game I need to deactivate the fallen pieces between first and second shot. I'm doing it setting IsActive = false and to not drawing the fallen pieces at the second turn. ¿Is that correct?
http://www.youtube.com/watch?v=Dc_8EJJENr0
Thanks
IsActive property
IsActive property
Jesús Bosch
XNA BLOG: http://geeks.ms/blogs/jbosch
XNA BLOG: http://geeks.ms/blogs/jbosch
Re: IsActive property
Deactivated entities will still be in the 'world' and can be collided with/reactivated. If you want to ensure that they are no longer part of the simulation, the most complete option is to remove them using space.remove. You can also change their collision rules such that the ball/other pins won't collide with them, though this would be more work with no significant benefit.
"Deactivation" is a time-saving operation that allows stable, unmoving entities to fall asleep. It's designed so that when something comes along and wakes it up, they will return to normal functioning. Under normal circumstances, you can't tell that things have gone to sleep; when you force objects to sleep, it's possible to see them stopped in mid-air or in other odd configurations, but it's the same state.
And looking good, by the way
"Deactivation" is a time-saving operation that allows stable, unmoving entities to fall asleep. It's designed so that when something comes along and wakes it up, they will return to normal functioning. Under normal circumstances, you can't tell that things have gone to sleep; when you force objects to sleep, it's possible to see them stopped in mid-air or in other odd configurations, but it's the same state.
And looking good, by the way