Fixed angle no longer supported?

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

2156295--142415--no fixed angle.png

I believe it has been directly under Rigidbody2D, but perhaps it has been moved to the “Constraints” subsection in the most recent version?

4 Likes

You must use the constraints or set freezeRotation=true

4 Likes

Ok thanks guys the constraints works :slight_smile:

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.

2 Likes

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.

1 Like

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.

1 Like

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.

1 Like

Thank you spinkleburger