I have a scene with an rotating sphere attached to a node called enemyNode. Using ray casting, I mark the surface with a square by attaching to it to enemy node and subtracting the enemyNode position from the contact point. This works perfectly when the enemyNode isn’t rotating, but I don’t know how to compensate for the rotation of the local coordinate system. How do I do that?!
Setting position and rotation of enemyNode to zero and changing back after attaching the square didn’t work
I suppose I could give the square it’s own node and rotate around it, but is that the only way?? Ugh, this is killing me