Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality. If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers. And always feel free to hit us up on Twitter @MxdRealityDev.

Shared Player and motion Controller positions

I'm attempting to created a shared scene where i can see other peoples position & rotation Along with controller position and rotation.

I have a player prefab with a head and two hands. I should see the remote players head and controllers as they move around.

I want to see my hands prefab over the top of my own controllers too.

The player prefab follows the mixed reality camera parent correctly.
Any ides what I'm doing wrong here?

 [SyncVar]
    private Vector3 localPosition;
    [SyncVar]
    private Quaternion localRotation;
    [SyncVar]
    private Vector3 remoteRightControllerPostion;
    [SyncVar]
    private Vector3 remoteLeftControllerPostion;
    [SyncVar]
    private Quaternion remoteRightControllerRotation;
    [SyncVar]
    private Quaternion remoteLeftControllerRotation;



    // Update is called once per frame
    void Update()
    {

        if (!isLocalPlayer)
        {
            rightHand.transform.localRotation = remoteRightControllerRotation;
            leftHand.transform.localRotation = remoteLeftControllerRotation;
            rightHand.transform.localPosition = remoteRightControllerPostion;
            leftHand.transform.localPosition = remoteLeftControllerPostion;
            return;
        }

        remoteLeftControllerRotation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.LeftHand);
        remoteRightControllerRotation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.RightHand);

        remoteRightControllerPostion = transform.TransformPoint(UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.RightHand));
        remoteLeftControllerPostion = transform.TransformPoint(UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.LeftHand));

        rightHand.transform.rotation = remoteRightControllerRotation;
        leftHand.transform.rotation = remoteLeftControllerRotation;
        rightHand.transform.position = remoteRightControllerPostion;
        leftHand.transform.position = remoteLeftControllerPostion;

        head.transform.rotation = CameraCache.Main.transform.rotation;
        transform.position = CameraCache.Main.transform.position;
        CmdTransform(CameraCache.Main.transform.position, CameraCache.Main.transform.rotation,  leftHand.transform.rotation, rightHand.transform.rotation, rightHand.transform.localPosition, leftHand.transform.localPosition);
    }


    /// Sets the localPosition and localRotation on clients.
    /// </summary>
    /// <param name="postion">the localPosition to set</param>
    /// <param name="rotation">the localRotation to set</param>
    [Command(channel = 1)]
    public void CmdTransform(Vector3 postion, Quaternion rotation, Quaternion rightHandRotation, Quaternion leftHandRotation, Vector3 rightControllerPostion, Vector3 leftControllerPostion)
    {

        localPosition = postion;
        localRotation = rotation;
        remoteRightControllerRotation = rightHandRotation;
        remoteLeftControllerRotation = leftHandRotation;
        remoteLeftControllerPostion = leftControllerPostion;
        remoteRightControllerPostion = rightControllerPostion;
    }![](https://us.v-cdn.net/6026774/uploads/editor/xo/xjmtiu29euyi.png "")

Sign In or Register to comment.