Hey guys,
I’m ripping my hair out on this one, it’s so aggravating! Basically I want to find the direction that the Z axis is pointing on the camera.
Scenario: Creating a FPS character movement script (don’t want to use the standard one, a year of programming in Game Maker has taught me to always code my own engines ). my objects are made up of 2 objects, a capsule (the actual mover) and the camera. obviously the capsule is the parent of the camera. When I press the W key the capsule needs to move in the direction the camera is facing (in other words, the z axis of the camera) and I can’t get it -.-
here are my fruitless attempts at this O.o (its javascript btw)
var camObject : Transform;
var forwardDir = camObject.forward;
function Update () {
print (forwardDir);
}
Probably to you Unity experts this is a simple n00b mistake but to me, it’s a nightmare
thank you,
why789