I just want to recreate this turn made by @Atrazine , for his tower defence game. Not the corner one, as I have already made it, but the one where the enemy is moving uphill and turns smoothly like that.
The post
This is what I have made:
I’m pretty sure he made it with lerp, but I’m not so sure
4 Likes
Kyl3ST
(Kyl3ST)
August 19, 2023, 11:01am
#2
high change he used tween service
2 Likes
what do you mean by ‘high change’?
1 Like
astraIboy
(The Batman)
August 19, 2023, 3:08pm
#4
Have you tried lerping???
1 Like
yeah, but im not sure if im lerping incorrectly as it looks weird.
1 Like
astraIboy
(The Batman)
August 19, 2023, 3:12pm
#6
Let’s check out the code for it you should just need to set the cframe of the block to the lerped cframe you already have when you align it to the surface its on
1 Like
Lerp(Node-1.CFrame:ToOrientation(), Node.CFrame:ToOrientation(), DeltaTimeAdded / OverallDeltaTime)
1 Like
astraIboy
(The Batman)
August 19, 2023, 3:14pm
#8
Alright so what does that look like? Could you send a video?
1 Like
Atrazine
(Atrazine)
August 25, 2023, 5:43pm
#10
I did not use any lerps or tweens for the movement. I did my own custom math to obtain the desired curve/hill behavior
It looks like a bspline, but do you know the name of the formula you used, or did you just think of it and make it up.
Atrazine
(Atrazine)
August 25, 2023, 10:32pm
#12
There might be a name for the algorithm, but I’m not sure what it is. I took out a pen and paper, did some math, and that’s pretty much it
1 Like
Did you use any ‘’’math.’’’ Functions or not? Like cos and sin?