I need to make the turn from going up, then going straight, up or down look good and smooth, similar to video 1, but I need to do it to my game, video 2
Video 1
Video 2
Video 1 looks fine, but with mine, video 2, it just kind of floats in the air a bit. I’m not sure if I need to do a Bezier curve or not.
code
local function UpHillTurn(EnemyData, Position, DeltaTime, Node)
local X, Y, Z = EnemyData.CFrame:ToOrientation()
EnemyData.UpHillDeltaTime += DeltaTime
if EnemyData.UpHillDeltaTime >= (3 / EnemyData.Speed) then
EnemyData.UpHillDeltaTime = 0
EnemyData.UpHillStatus = 0
return CFrame.fromOrientation(X, Y, Z)
else
EnemyData.UpHillStatus = 1 - EnemyData.UpHillDeltaTime / (3 / EnemyData.Speed)
return CFrame.fromOrientation(CFrame.new(GetNode(Node - 1, EnemyData.Path).Position, GetNode(Node, EnemyData.Path).Position):ToOrientation() * EnemyData.UpHillStatus, Y, Z)
end
end
It all works fine, just not sure whether I should do a bezier curve or edit it?