No, wheels, servos or seats were used to create this, just linearvelocites, the skateboard and character also have cancollide set to false, using a raycast to make the character stay above ground
5 Likes
This looks more like a hoverboard mechanic than a skateboard. I would introduce friction more as a factor and decrease the power. This is a good start though.
3 Likes
This looks great, just one question, how exactly did you make the player turn to align themselves with the floor normal, I’ve been trying to do it for my own game?
friction is apart of the code, hence why it slows down
pretty simple
Here you go:
---------------------- Tilt ----------------------------------
y_radian = math.rad(root.Orientation.Y)
x_radian = -math.asin(-ray.Normal:Cross(root.CFrame.RightVector).Y)
z_radian = math.asin(-ray.Normal:Cross(root.CFrame.LookVector).Y)
local angles = CFrame.Angles(0,y_radian,0)*CFrame.Angles(x_radian,0,z_radian)
root.CFrame = CFrame.new(root.Position)*angles