02-15-2015 05:10 AM
02-15-2015 12:17 PM
02-16-2015 07:39 AM
using UnityEngine;
using System.Collections;
public class AlignToTracker : MonoBehaviour {
public Transform hmdOrientation; // In the inspector add the "OVRCameraRig/CenterEyeAnchor"
private Vector3 tempRot;
// Update is called once per frame
void Update () {
// Hack to align avatar head-bone to tracker orientation
tempRot.x = -hmdOrientation.localEulerAngles.y;
tempRot.y = hmdOrientation.localEulerAngles.z;
tempRot.z = -hmdOrientation.localEulerAngles.x;
// Update head rotation
transform.localEulerAngles = tempRot;
}
}
02-17-2015 11:55 AM
02-17-2015 12:49 PM
"serrarens" wrote:
You might want to take a look how I solved this in my InstantVR Free asset. It is for a humanoid avatar, but I think you should be able to translate that to the dogs head. You can retrieve it for free from the asset store: https://publisher.assetstore.unity3d.com/package.html?id=89965
02-18-2015 05:02 AM
04-27-2015 06:34 AM
09-23-2022 07:50 AM
Hi,
I was looking for a solution to the same question you had. Could you explain what animations you added to the head and did the head rotate according to the headset. So when you rotated your head could you look at the environment in unity that is on the right?Instead of the whole environment moving with the head movement.
I hope I made sense.
Thank you in advance