The camera is upside down (for complex and not modifiable reasons) and GetComponentsBounds / RandomPointInBoundingBox do not seem to take rotations in consideration.
Has any of you worked on something similar or has any idea to help me figure this out?
I would really appreciate it.
Thanks.
Generate a point as your box would be centered in 0,0,0 and with no rotation - just a random vector in range/bounds or what ever it’s called. Or you can always just generate 3 random floats in range and make vector out of them.
Then do a Transform(RandomPoint, GetActorTransform(Box)) this will translate your point into a world space aligned with box. You need to use TransformLocation node for this.
I’m not sure I grasped what you suggested, but maybe it’s because it’s late and I’m tired.
The point I should randomly get, should be in a box of the same size as the rotated one, right?
Then I should do as in this picture? With T being GetWorldTransform of the Collison Box component, and Location being the random point in the surrogate box?
I also need to hunt this guy down and buy him a couple of rounds,
been having this issue with a spawn-box & the vector rotation being inconsistent for a solid month. Hadn’t been able to narrow the issue down until I stumbled upon this post. Much appreciated.