- Home /
Projectile collides, freezes, but flips to weird angle. Help!
Hi guys,
As mentioned I shoot projectile, and it collides properly with the object, and freezes, and even moves with the it. However as I'm using Sphere and Capsule collider, if it hits the sides (or anywhere really) it flips to a weird angle.
Almost like the middle of the projectile is now ppinned to the character. I've tried a lot of different 'freezing' and 'constraints' solutions but it still does it. Any help would be fantastic!
(code is on the object, not the projectile)
//freeze rigidbody
collision.gameObject.GetComponent<Rigidbody> ().isKinematic = true;
//parent to object
collision.transform.parent = transform;
//change color to be blue
transform.GetComponent<Renderer> ().material.color = Color.blue;
I don't really understand your problem but projectiles rotation might be changing because you assign a parent to it. $$anonymous$$aybe this save your projectile rotations before assigning a parent and then assign that rotation value after. $$anonymous$$aybe share some images or before and after its rotation values and the parents rotation values.