Trigger Object is still moving objects?
The player in my game gets destroyed when it collides with any objects with the tag "Obstacle". However i have run into something weird. I have a cross-shaped object that has torque making it spin clockwise. When the player collides with it, the player is meant to get destroyed and the scene changes. For some reason though when the like corner of the player hits the edge of the cross, the cross moves a bit when the player should be destroyed.
void OnCollisionEnter2D(Collider2D coll) {
if (coll.gameObject.tag == "Obstacle"){
Destroy(gameObject);
Death();
}
It always works with every other obstacle object and even the cross. Its only when the corner of the player scrapes the cross it gets pushed a bit. So how do i prevent this to make it look there are no physics even when all the objects have rigidbodies? note: I even tried making the player trigger and changing oncollsionenter to triggerenter but the problem still occurs.
Answer by ahokinso · Mar 29, 2016 at 05:00 AM
You could try Freeze Rotation on the cross Rigidbody? (This would obviously assume the cross never rotates...
Well what good is that since the whole point of the cross is the fact that it rotates