Rotating Changes Raycast Direction?

I’m rotating an object with a script attached to it that fires a raycast using Vector3.down. It’s been working fine but today I rotated the character along their Z axis (so down became up) and it started firing up. How can I keep it firing along the global axis rather than the object’s local axis?

Here’s my raycast.

Physics.Raycast(feetPosition, Vector3.down, hit, maxDistance)

Vector3.down is the global axis, so that code will always raycast down.

–Eric

It should but it’s not. That’s why I’m confused.

It is though. :slight_smile: I would say you have something else going on.

–Eric