Hi, how can i get Vector.down in World Space?
I have tried with -transform.up but it's still local.
Here's my current code:
Vector3 fwd = transform.TransformDirection(Vector3.down);
RaycastHit hit;
if(Physics.Raycast(transform.position, fwd, out hit, 10000, 1)) {
if(hit.transform.name == "Landscape") {
print(Vector3.Distance(transform.position, hit.point));
}
}
The problem is, that it's using local space. How can I send a raycast directly down in World Space?
Thanks in advance.
Andreas.
↧