Down vector from local space

Hey guys,

It might just be getting late, but im getting a little confused here. Basically i would like to raycast straight down. Simple enough, ray cast with a direction of negative vector up. But i’m ray casting from my camera, which would be tilted down at an angle. So if i raycast in the direction of negative vector up that wouldn’t be directly downwards.

I’d like to raycast down from my camera and disregarding it’s actual direction it is pointing it.

Can anyone nudge me in the right direction? Cheers.

Kinda a newbie myself, but couldn’t you just raycast from the camera’s coordinates instead of from the camera itself?

Use -Vector3.up. The Vector3 vectors are based on worldspace, not on localspace.

-transform.up would be the local down.

Oh right. I was trying that, but for some reason it was just pointing into a random direction. I was debugging the raycast using DrawLine. I’ll try it again and see, Thanks.