Body position makes player flip

Hi!

I made a move in my game that dashes with bodyposition and it can work only with bodyposition.

But i made so bodyposition.P = 50000 and bodyposition.MaxForce = vector3.new(20000, 20000, 20000)

My problem is that the dash works when the dash distance is small but when i make the dash distance at least double then when i hit an object while dashing the player flips.

How can i prevent that from hapening?

Any suggestions whould be greatly appreciated!!!

You could use a AlignOrientation or BodyGyro (Preferable) to lock the player’s orientation and prevent flipping

2 Likes

I’d recommend not using BodyPosition, rather you should use AlignPosition.
It’d be understandable if you were using it for a two axis mode type thing, but in this case you should just use AlignPosition.

1 Like

You can use raycasting to detect if there are objects in the way before you dash the player. Then, if there are parts in the way, minimize how far the player dashes to prevent collision.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.