How to get down vector?

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

3 Likes

So I assume your planning on getting the distance using your ray between your chopper and the ground?

1 Like

I want to ray cast under a part, liek a down vector basically

1 Like

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.

5 Likes

just do negative upvector and you get it

1 Like

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.

1 Like