@@ -12,15 +12,15 @@ public class ZOMoveTest : MonoBehaviour {
1212 // public float _time = 1.0f;
1313
1414 public enum MoveTypeEnum {
15- RotateRoll ,
16- RotatePitch ,
17- RotateYaw ,
15+ RotateRollRight ,
16+ RotatePitchForward ,
17+ RotateYawRight ,
1818 TranslateForward ,
1919 TranslateRight ,
2020 TranslateUp
2121 }
2222
23- public MoveTypeEnum _moveType = MoveTypeEnum . RotateRoll ;
23+ public MoveTypeEnum _moveType = MoveTypeEnum . RotateRollRight ;
2424
2525
2626 private Rigidbody _rigidBody ;
@@ -49,13 +49,13 @@ void Update() {
4949 // Update is called once per frame
5050 void FixedUpdate ( ) {
5151 if ( _isRunning ) {
52- if ( _moveType == MoveTypeEnum . RotateRoll ) {
53- Quaternion rotation = Quaternion . Euler ( _startRotationEuler + new Vector3 ( 0 , 0 , _currentValue ) ) ;
52+ if ( _moveType == MoveTypeEnum . RotateRollRight ) {
53+ Quaternion rotation = Quaternion . Euler ( _startRotationEuler + new Vector3 ( 0 , 0 , - _currentValue ) ) ;
5454 _rigidBody . MoveRotation ( rotation ) ;
55- } else if ( _moveType == MoveTypeEnum . RotatePitch ) {
55+ } else if ( _moveType == MoveTypeEnum . RotatePitchForward ) {
5656 Quaternion rotation = Quaternion . Euler ( _startRotationEuler + new Vector3 ( _currentValue , 0 , 0 ) ) ;
5757 _rigidBody . MoveRotation ( rotation ) ;
58- } else if ( _moveType == MoveTypeEnum . RotateYaw ) {
58+ } else if ( _moveType == MoveTypeEnum . RotateYawRight ) {
5959 Quaternion rotation = Quaternion . Euler ( _startRotationEuler + new Vector3 ( 0 , _currentValue , 0 ) ) ;
6060 _rigidBody . MoveRotation ( rotation ) ;
6161 } else if ( _moveType == MoveTypeEnum . TranslateForward ) {
@@ -69,7 +69,7 @@ void FixedUpdate() {
6969 _rigidBody . MovePosition ( _startPosition + velocity ) ;
7070 }
7171
72- _currentValue = _currentValue + ( _speed * Time . fixedDeltaTime ) ;
72+ _currentValue = _currentValue + ( _speed * Time . deltaTime ) ;
7373
7474 if ( _currentValue > _minMax . y ) {
7575 _isRunning = false ;
0 commit comments