Hello! I’ve been trying to work on a movement system slightly from scratch using VectorForces. I have this set up when the player is pressing W:
local function moveForward()
local VectorForce = HumanoidRootPart:FindFirstChild("VectorForce")
local forceMultiplier = 5000
local direction = HumanoidRootPart.CFrame.LookVector
VectorForce.Force = direction * forceMultiplier
end
Whenever the player is pressing W, the Force property on the VectorForce changes based on the HRP’s LookVector (supposedly where the player is facing). However, there is some strange behavior when the player is not facing the negative Z direction. Here’s a visual representation of the problem I’m having:
The black box represents the HumanoidRootPart. The orange arrow represents the direction the player is facing, and the blue arrow represents the direction of the vector force. The axes are also listed. For other information, I am using the standard player’s character and I have locked their camera to first person using Enum.CameraMode.LockFirstPerson
.
What can I do to apply a VectorForce in the direction in which the HRP is facing without this strange directional behavior occuring?