File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Runtime/Scripts/Controllers Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ void Update() {
3131 private void FixedUpdate ( ) {
3232 Rigidbody slideBody = _prismaticJoint . gameObject . GetComponent < Rigidbody > ( ) ;
3333 float currentPosition = slideBody . transform . localPosition [ ( int ) _driveAxis ] ;
34- float force = _pidController . Update ( currentPosition , Time . fixedDeltaTime ) ;
34+ float force = _pidController . Update ( currentPosition , Time . deltaTime ) ;
3535 Vector3 globalUpForce = new Vector3 ( 0 , 0 , 0 ) ;
3636 globalUpForce [ ( int ) _driveAxis ] = force ;
3737 Vector3 localUpForce = slideBody . transform . worldToLocalMatrix . MultiplyVector ( globalUpForce ) ;
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ private void Start() {
134134
135135 private void FixedUpdate ( ) {
136136
137- float motorTargetVelocity = _pidController . Update ( UnityHingeJoint . angle , Time . fixedDeltaTime ) ;
137+ float motorTargetVelocity = _pidController . Update ( UnityHingeJoint . angle , Time . deltaTime ) ;
138138 if ( _pidController . IsAtDeadBand ) {
139139 JointSpring hingeJointSpring = UnityHingeJoint . spring ;
140140 hingeJointSpring . damper = 50000.0f ;
You can’t perform that action at this time.
0 commit comments