I am stuck trying to get the actual size/bounding box of the Vehicle from the C++ Example Project, that is a box around the actual sedan itself.
this->GetActorBounds() yields another, varying box.
I also tried simulating such a box with a UBoxComponent*, but I can’t find a working way to rotate that based on the vehicle’s rotation?
Am I missing a certain function, or what am I doing wrong?
Thanks in Advance!
aactor->GetActorBounds() or UStaticmeshComponent->GetLocalBounds() returns the bounding boxes. If its using a box component then you can use the GetUnscaledBoxExtent()
if your running get actor bounds it works out a new bounding box to encompass all components in the actor. If you just want a specific mesh get it from the component with the GetLocalBounds
The Vehicle appears to be using a USkeletalMesh, I can’t find a GetLocalBounds() method for it, is the process for these different?
Theres a CalcBounds() function on skeletal meshes, but its probably not what you want. With a skeletal mesh they probably get the bounds from the physics asset.