// Update is called once per frame void Update() { if (rtClient == null) { rtClient = RTClient.GetInstance(); } SixDOFBody body = rtClient.GetBody(ObjectName); if (body != null) { if (body.Position.magnitude > 0) //just to avoid error when position is NaN { transform.position = body.Position + PositionOffset; if (transform.parent) { transform.position += transform.parent.position; } transform.rotation = body.Rotation * Quaternion.Euler(EulerOffset); if (transform.parent) { transform.rotation *= transform.parent.rotation; } } } }
// Update is called once per frame void Update() { if (rtClient == null) { rtClient = RTClient.GetInstance(); } body = rtClient.GetBody(ObjectName); if (body != null) { this.applyBody(); } }
// Update is called once per frame void Update() { if (rtClient == null) { rtClient = RTClient.GetInstance(); } var body = rtClient.GetBody(ObjectName); if (body != null) { applyBodyTransform(body); } }