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

JointMotor2D freeSpin?

Discussion in 'Physics' started by Game-Whiz, Jan 13, 2016.

  1. Game-Whiz

    Game-Whiz

    Joined:
    Nov 10, 2011
    Posts:
    122
    JointMotor has a freeSpin property such that "If freeSpin is enabled the motor will only accelerate but never slow down."

    JointMotor2D has no such feature and my 2D cars brake when going downhill since their velocity when going downhill would surpass WheelJoint2D's joint speed.

    Any suggestions on how to overcome this?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,321
    Box2D doesn't support this but it would be possible to add it. I'm not sure there's any way to achieve this now beyond simply turning-off the motor when the wheel-body motion is beyond a certain angular velocity.

    I've added this to the internal feature request board.
     
  3. Game-Whiz

    Game-Whiz

    Joined:
    Nov 10, 2011
    Posts:
    122
    Ok, thanks MelvMay