Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Fixed angle no longer supported?

Discussion in '2D' started by Dr.FortuneC, Jun 12, 2015.

  1. Dr.FortuneC

    Dr.FortuneC

    Joined:
    Jun 11, 2015
    Posts:
    4
    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
     
  2. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Please provide a screenshot.
     
  3. Dr.FortuneC

    Dr.FortuneC

    Joined:
    Jun 11, 2015
    Posts:
    4
    Here
     

    Attached Files:

  4. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    I believe it has been directly under Rigidbody2D, but perhaps it has been moved to the "Constraints" subsection in the most recent version?
     
  5. grosssmutttr

    grosssmutttr

    Joined:
    Apr 15, 2014
    Posts:
    168
  6. Dr.FortuneC

    Dr.FortuneC

    Joined:
    Jun 11, 2015
    Posts:
    4
    Ok thanks guys the constraints works :)
     
  7. t0mmy5t3ch

    t0mmy5t3ch

    Joined:
    Jul 19, 2015
    Posts:
    2
    What do I select under constraits im still trying to make a 2D game please help
     
  8. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Freeze Rotation Z, the only thing there is for rotations. You could have just tried it yourself.
     
    malisasmaz and BigWildZebra like this.
  9. t0mmy5t3ch

    t0mmy5t3ch

    Joined:
    Jul 19, 2015
    Posts:
    2
    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
     
  10. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Uhh, rotation is not the same as collision? This thread is about the former.
     
  11. dearista

    dearista

    Joined:
    Aug 8, 2015
    Posts:
    2
    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??
     
  12. dearista

    dearista

    Joined:
    Aug 8, 2015
    Posts:
    2
    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??
     
  13. dedz26

    dedz26

    Joined:
    Sep 23, 2015
    Posts:
    1
    In Unity 5.1, the fixed angle effect is done via
    Rigidbody2D.constraints

    so, setting like this.
    <img src=" i.stack.imgur.com/J5K1R.png" />
     
    mercurypham likes this.
  14. Nitride

    Nitride

    Joined:
    Jun 15, 2013
    Posts:
    15
    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.
     
    cmurray18 likes this.
  15. spinkleburger

    spinkleburger

    Joined:
    Dec 27, 2015
    Posts:
    3
    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.
     
  16. aidanalistairgrey

    aidanalistairgrey

    Joined:
    Jan 23, 2016
    Posts:
    2

    Thanks spinkleburger. Did you have much difficulty transferring the information from that tutorial to Unity 5?
     
  17. spinkleburger

    spinkleburger

    Joined:
    Dec 27, 2015
    Posts:
    3
    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.
     
  18. aidanalistairgrey

    aidanalistairgrey

    Joined:
    Jan 23, 2016
    Posts:
    2
    Wow, thanks.
     
  19. kosalam2

    kosalam2

    Joined:
    Nov 28, 2013
    Posts:
    1
    voidStart () {
    GetComponent<Rigidbody2D> ().freezeRotation = true;
    }

    Set freezerotation = true on your Start method.
     
    Merlin5 likes this.
  20. xxIaMsOePiCxx

    xxIaMsOePiCxx

    Joined:
    May 8, 2016
    Posts:
    2
    Thank you spinkleburger