Question by
noorudheen · Jun 08, 2017 at 10:41 PM ·
scripting problemvector3
how to provide axes input to fpscontroller according to maincamera y rotation ?
I am trying to use a fpscontroller script for VR walking. I can get the script to walk the character by providing horizontal and vertical axes values to 1,-1,0 etc.. but the player rotation is not correct. if I rotate the head in certain direction, y rotation of main camera changes and the player walks forward. but looking in to different direction (according to new main camera y rotation) player moves in wrong direction, either side wards or backwards.
I want to get a proper, +/- 1 value for axes according to Y rotation of main camera. How to do this?
Comment