TouchBox->SetBoxExtent(FVector(20,10,5),false);
shall work.
But also remind extend is the half of the size of the box.
Greetings Tim
TouchBox->SetBoxExtent(FVector(20,10,5),false);
shall work.
But also remind extend is the half of the size of the box.
Greetings Tim
TBH i really have not much of a clue as to what i’m doing with Components etc, most tutorials are really specific and don’t go into the whys.
Anyway, i’m trying to set the scale of a box component, i think i do it through SetBoxExtent, it says to use an FVector to define the Coordinates, how do i go about using it?
What i’ve got.
TouchBox->SetBoxExtent(20, 10, 5, false);
Thanks for the quick answer So should the values be double what i need them to be? To have the box the size i need? And why is it only half? Is there a better method to use?
No I mean the other way round:
if (20,10,5) is your size you have to use an extent of (10,5,2.5).
I assume you are using UBoxComponent then you can only use SetBoxExtent() and no alternative method
if you use true the BoxComponent will re-process if it overlaps with other components and generate overlap events, false will bypass this processing
Oh okay, good explanation thankyou
What is the false parameter for? Can’t seem to find it in the documentation
So if im using the component for collision purposes i should set this to true? And out of curiosity, why must i half all my dimensions? Thankyou for your patience & answers
Hey Green_,
Sorry for the late awnser, but yes. Only set the value to true when using overlap events, and you have to use half because it is a box. If you want 25, 10, 10 you would do 12.5, 5, 5 because it applys your values to all sides. And with a box that is times 2. It applys the value to all the x’s y’s and z’s in this drawing I made: Screenshot by Lightshot
I hope that this makes more sence