c# - First Person Controller camera rotation doesn't work -
i'm looking c# script on unity update first person controller camera rotation transform. more specificly, i'm running animation, , end of animation, set "movie camera transform" on fps camera transform, how show code. position variable, ok. however, rotation variable doesn't work well. variable transform rotation right (the same movie camera transform), can't see change on scene. "first person controller rotation transform" last rotation coordinate happened. tested many rotation functions, rotate(vector3), rotation, localrotation, eulerangles, localeulerangles....
vector3 pos, roteuler; public camera fpscam, movie; void getposrot(){ roteuler = movie.transform.eulerangles; pos = movie.transform.position; } void update(){ fps.transform.position = pos; fps.transform.eulerangles = roteuler; }
Comments
Post a Comment