- Home /
Sphere collision doesn't work when transform is rotated
Hi folks, I have collision item I update via script created this way:
In the script attached to it is the following code:
this.rigidbody.AddForce(new Vector3(0, -1, 0));
this.transform.rotation = Quaternion.LookRotation(-this.rigidbody.velocity);
This works great, except the model is upside down. However, if I try to set the LookRotation to the velocity (which is corect), then the collision does not occur! Any ideas why that is?
I understand I Can simply flip the model in the program and go from there, but I'd like to know why this does not work and perhaps a way to address it?
Thanks, James
Your answer
![](https://koobas.hobune.stream/wayback/20220613113918im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
I want collision boxes to be precise without overlapping each other 1 Answer
Rigidbody Disable Velocity/Movement? 1 Answer
Velocity bug with hinge joints forces in C# 0 Answers
Why is the relativeVelocity of a Collision always zero in OnCollisionEnter and OnCollisionStay? 0 Answers
How to get the relative position of a Collider with OnControllerColliderHit()? 2 Answers