I have no idea why or how, the situation isn't that complicated, and the title sums it up perfectly. Vector3.up/down work fine, same with left/right. I'm using a blender model and I heard that tends to ruin the axes. I've tried transform.up/forward as well, same problem. This seems impossible to have a fix for so I'll be surprised if anyone has any.
Vector3 forward = transform.TransformDirection(transform.forward);
Vector3 toOther = agent.steeringTarget - transform.position;
if (Vector3.Dot(forward, toOther) < 0) {
lookAtPath = false;
}
↧