Velocity moving the player at an angle

I am programming an ability that involves forcefully moving the player. The player is often moved at an angle, which causes them to miss their target. This seems to happen all of the time and even when the player is not turning

I am using a BodyVelocity to move the player, created through a local script. It uses LookVector from the HumanoidRootPart to choose a direction.

1 Like

So what do you exactly want? To make the angle at a 90 degree angle? If so round to 90.

math.floor(angle / 90) * 90

Or use a cardinal function. I’m not sure the code above works.

The goal is to move the player in the direction they are facing, sorry for not clarifying.

Ah ok thanks for the clarification. So first try using linear velocity, body velocity is depreciated, and enable apply at center of mass.

Alright, let me just figure out how linear velocity works

Alright, I think it works. Thanks!

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