Hello! Currently for fun I’m making a hovercraft which will move in the direction of wasd, but I am very new to body forces, body velocity’s, body gyros, etc. So I need some help of course, I’ve already created forward backward movement but its very bad, my main issue currently is moving a part with forces in one direction where the parts facing not an axis, I would also like to completely revamp the system because I don’t know how to turn the vehicle well with a and d and with body gyros
This is the inspiration: [NEW CRITICAL ADVENTURE!] Countless Worlds - A Small Look - YouTube
CassioTDS
(BayerischerPartei)
February 14, 2022, 1:32am
#2
I already have but am having a hard time finding out how to move a part in a direction that the part is facing and not just an axis
how would I do this? (sorry I’m new to this type of thing)
CassioTDS
(BayerischerPartei)
February 14, 2022, 2:14am
#6
That’s fine!
For example, moving a brick forward 5 units from another brick would look like this: [Forward = Facing the FRONT
surface]
local movingBrick = script.Parent:FindFirstChild("moving")
local staticBrick = script.Parent:FindFirstChild("static")
movingBrick.CFrame = staticBrick.CFrame + staticBrick.CFrame.LookVector * 5
Attyuo2
(Attyuo2)
February 14, 2022, 2:22am
#7
Try this with a BodyVelocity !
BodyVelocity.Velocity = vector3.new(BasePart.CFrame.LookVector*100) -- change 100 to wahtever you want
This will make it go in the direction it is facing! I hope this helps you! =) (Also make sure all parts are welded, of course)
so how would i apply this? what is static brick?
CassioTDS
(BayerischerPartei)
February 14, 2022, 10:09pm
#9
Static is just a word I used to imply that the brick doesn’t move.
BasicUserID
(BasicUserID)
February 15, 2022, 12:49am
#10
I used this but didn’t understand how i set up the property’s of body velocity
looks like this currently
BasicUserID
(BasicUserID)
February 15, 2022, 2:19am
#12
sorry about other comment, this works but adding the Vector3.new broke the thing and when i removed it, it fixed so thanks
BasicUserID
(BasicUserID)
February 15, 2022, 3:28am
#13
another question how would i rotate the vehicle for instance 45 degrees?
Attyuo2
(Attyuo2)
February 16, 2022, 2:07am
#14
Sorry! I was asleep and at school. D:
To rotate something, you could do:
Vehicle:SetPrimaryPartCFrame(Vehicle:GetPrimaryPartCFrame()*CFrame.Angles(0,math.rad(45),0))
You could make it look nice by tweening it too! Here’s some more documentation on CFrame (Scroll down for an explanation on CFrame.Angles()) !