Get Random Point In Bounding Box Problem If Rotated

It’s a pain in the bum, basically :slight_smile:

The bounds calculation is correct, so we need to calculate via a box the doesn’t rotate with the actor, and then correct.

I have two components, one that always corrects to zero rotation when I move the actor

image

We need to find the points in the unrotated box, and do a couple of transforms to get the rotated box

It works.

The random point node gives you world coordinates, not much use here. So we have to make them local, rotate them by the amount the actor is rotated, and then make them world again :slight_smile:

rotatedbounds

2 Likes