2D Toolkit Forum
2D Toolkit => Support => Topic started by: EddyL on June 27, 2012, 05:08:48 am
-
I got this message when flipping an animated sprite after a collision with a Box Collider
Destroying object immediately is not permitted during physics trigger
void OnCollisionEnter (Collision collision)
{
if(collision.gameObject.tag=="GroundCollider")
{
anim.FlipX (); // Seems to be the source of the problem
}
}
My Animated Sprite uses the "BoxTrimmed" Collider..
Anything I am missing here??
Sorry, and thanks!!
-
Hi,
This should be fixed in 1.75 final. The reason its doing that is in the editor, the collider is recreated every time it is modified to avoid some issues. In game however, the collider will only be resized.
The patch in 1.75 basically makes it run the "game" path when the editor is in Play mode.
-
So I should just wait for the update then, thanks!!
-
1.75 final is already out - the issue should've been resolved in there.