How do I find a position in world space given an initial position, distance, and rotation?

I am trying to set up a bodyPosition so my player moves to the direct left or right of the camera’s orientation when a button is pressed. I think I may need some trigonometry, but I’m not fully sure. I’m not the best when it comes to math, so i’m wondering if someone can push me in the right direction.

What I Currently Have:

  • the camera’s Y rotation (in radians, if i should change it to degrees lemme know)

  • the distance the player would travel

What I Need:

  • the end position

Code:

local function yOrientation(obj)
	if obj then
		local cframe = obj:ToWorldSpace()
		local x,y,z = cframe.Angles
		
		return y
	else
		return nil
	end
end

function physics:LinearThrust(forceType,D,P,maxForce,distance,camCFrame)
print("thrusting!")
if forceType == "BodyPosition" then
	local initPosition = self.hrp.Position -- returns vector3
	local rotation = yOrientation(camCFrame) or yOrientation(self.hrp) -- returns radian relative to world space
		
		local thrust = Instance.new("BodyPosition")
		thrust.Parent = self.hrp
		thrust.D = D
		thrust.MaxForce = Vector3.new(maxForce,maxForce,maxForce)
		thrust.P = P
		
		-- find end position with initial position, distance, and rotation
		
	end
end

Try calculating velocity with the amount of force applied or the time it takes to stop, then you’ll have your end position when plugged into an equation.