- Home /
Question by
boyoon8450 · Sep 13, 2018 at 01:28 PM ·
c#rotatetilttransform.rotatez axis
How to rotate terrain or tilt it for z axis when play mode? (C#) just think of it as an object
i'm making a run game, and i've trouble with tilting terrain when player runs
First i tried to rotate with z axis using animation but it didn't go well so i'm trying to work it as a C# script.
want to tilt the terrain just for z axis and only -30~0 degrees.. and want to make it move slowly as possible I don't want to change x, y axis and if player passes through, want to make it stop
I searched for transform.rotate, transform.eulerAngles.z and mathf.clamp and is it the right track i'm doing?
Thanks for any help! :)
Comment