Search Unity

Joint: Set to fixed angle, direction, speed

Discussion in 'Physics' started by mentalgear, Aug 1, 2019.

  1. mentalgear

    mentalgear

    Joined:
    Jul 19, 2019
    Posts:
    23
    My goal is to manipulate a joint for that it rotates to a set angle, with a given direction and speed (or force).

    Example:
    setAngle ( angle, direction, speed )
    With the following input mapping:
    angle: 0 - 360
    direction: forward / backward
    speed:float

    I searched through several forum posts as well as at the documentation to figure out how I could make joints behave like that. What seems pretty basic, turns out quite hard to realize in unity, as all I found in the documentation is a motor to drive the joint at a set speed, or quite exotic transformations with slerp drives. I would appreciate if someone could let a unity newbie know how to implement such a function within the mechanics available.