AlignPosition : how to move towards LookVector

I have a vehicle that is using alignposition and alignorientation. I’m trying to make it so when the throttle is up, it moves towards the direction it’s orientated towards.

local destVector = seat.CFrame.LookVector * 2
seat.AlignPosition.Position = Vector3.new(destVector.X, seat.AlignPosition.Position.Y, destVector.Z)

I figured that I could use the lookvector, multiply it by a number, and move towards that direction, but im experiencing the following issue


The left is what it should be like, but for some reason the LookVector is diagonal, its moving going diagonally. Once it reaches that, it doesn’t move anymore

you need to add the lookvector to the current position to get the new position

just a raw lookvector will be relative to the origin at 0,0,0

local lookVector = seat.CFrame.LookVector*2
local destination = seat.AlignPosition.Position + lookVector
seat.AlignPosition.Position = destination
1 Like

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