Advertisement
Eonirr

Untitled

May 15th, 2023 (edited)
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. Vector3 localVelocity= transform.InverseTransformDirection(_rb.Velocity);
  2.  
  3. localVelocity.x = -input * speed* Time.fixedDeltaTime;
  4.  
  5. _rb.Velocity= transform.TransformDirection(localVelocity);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement