why is the fixed angle not showing in my unity 5? without it my 2d character keeps randomly tilting either left and right, so how can i prevent this? Thanks
Please provide a screenshot.
Here

I believe it has been directly under Rigidbody2D, but perhaps it has been moved to the âConstraintsâ subsection in the most recent version?
You must use the constraints or set freezeRotation=true
Ok thanks guys the constraints works ![]()
What do I select under constraits im still trying to make a 2D game please help
Freeze Rotation Z, the only thing there is for rotations. You could have just tried it yourself.
I selected freeze rotation Z but its still falling through the floor
This is the tutorial im watching if you guys know a better tutorial please leave it in your comment
Uhh, rotation is not the same as collision? This thread is about the former.
Iâve been using constraints in unity,but,the objects remain slow at a time when falling down.
Anyone know how to increase the peed ofthe falling objects without affecting mass and gravity??
Iâve been using constraints in unity,but,the objects remain slow at a time when falling down.
Anyone know how to increase the speed of the falling objects without affecting mass and gravity??
In Unity 5.1, the fixed angle effect is done via
Rigidbody2D.constraints
so, setting like this.
Did you ever figure it out? If not then I can help point you in the direction of some good tutorials or help explain to you what you need to do.
Hereâs a better tutorial: http://www.lynda.com/Unity-2D-tutorials/Unity-4-2D-Essential-Training/159243-2.html
But try this:
Add the component âBox Colider 2Dâ to the object falling and the floor object. Also add the component âRigidBody 2Dâ to the falling object. Make sure the option âIs Triggerâ is unchecked in the âBox Coliderâ component on both objects. To prevent rotations, check the âZâ box in the âRigidbody 2Dâ component.
Thanks spinkleburger. Did you have much difficulty transferring the information from that tutorial to Unity 5?
Yes I did unfortunatelyâŚ
If you run into any snags, with certain scripts, post it here and Iâll show you the updated code I used.
Wow, thanks.
voidStart () {
GetComponent ().freezeRotation = true;
}
Set freezerotation = true on your Start method.
Thank you spinkleburger