I am trying to ray cast under a chopper to know if it’s on ground. how do I do this?
I was thinking on something like:
-Engine.CFrame.UpVector
or
Engine.CFrame.UpVector.Unit * -10
But I don’t know if this would work
I am trying to ray cast under a chopper to know if it’s on ground. how do I do this?
I was thinking on something like:
-Engine.CFrame.UpVector
or
Engine.CFrame.UpVector.Unit * -10
But I don’t know if this would work
So I assume your planning on getting the distance using your ray between your chopper and the ground?
I want to ray cast under a part, liek a down vector basically
You would get the up vector ( negative ) to get down vector basically. There is no reason to normalize the vector since UpVector, LookVector, Right Vector and Back Vector already return in units.
just do negative upvector and you get it
My internet will cut off in like 10 mins, but what you can do is this.
local totaldistance = 10
local part = chopper.Engine
local X = Ray.new(Part.Position, Vector3.new(0,-10 * totaldistance,0))
local PartFound, position = workspace:FindPartOnRay(R)
local Distancefromground = Engine.Position.Y - Position.Y
print(Distancefromground)
I’m not sure, but I’m pretty sure since you want it go downwards, you simply have to make the Y coordinate negative.