1. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. tugamano

    tugamano Plugin Developer

    Any method to know rotation of a character player?
    I tried with this:
    Quaternion rotation = Quaternion.LookRotation(netuser.playerClient.lastKnownPosition);
    But apparently he gives me the rotation of the position and not the personage, So I think it's something like this:
    player.playerClient.rootControllable.GetComponent<Character>().(What should I do here?);

    I have little knowledge on Unity Engine.
     
  2. Pleskac

    Pleskac Scavenger

    Try this
    Code (Text):
    Quaternion playerRotation = player.playerClient.rootControllable.GetComponent<Character>().eyesRotation;
    or
    Quaternion playerRotation = player.playerClient.rootControllable.GetComponent<Character>().rotation;
     
    tugamano likes this.
  3. tugamano

    tugamano Plugin Developer

    Perfect Pleskac The 2 me works A ++ for you thanks for your help.