Hello.
I’m trying to attach my main camera to the head bone so that when the head is animated, so will the camera. Note that the camera also has a mouse look script for only the Y-axis (for looking up and down, left/right is handled in the player).
I’m also using the character in the Locomotion System
I’m a fan of using scripts and such so this is what I was using to attach it as a parent:
#pragma strict
var assignTo : Transform;
function Start(){
transform.parent = assignTo;
}
This works but then the camera is facing the wrong way. Something’s wrong with the rotation. I’m sure there’s something I can do to fix the rotation but I am unsure on how to do that.
Here are some screenshots.
Main character/scene:
http://puu.sh/1uoNW
In game:
http://puu.sh/1uoVh
In scene (while running):
http://puu.sh/1uoWj
In scene (while running, head selected):
http://puu.sh/1uoXa
In scene (while running, camera selected):
http://puu.sh/1uoXo
I know it’s probably something small but I just can’t figure it out.
Thanks!