x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

SetBoxExtent how to use FVector

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);
Product Version: Not Selected
Tags:
more ▼

asked Aug 30 '14 at 10:10 AM in C++ Programming

avatar image

Green_
57 27 18 21

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first
 TouchBox->SetBoxExtent(FVector(20,10,5),false);

shall work.

But also remind extend is the half of the size of the box.

Greetings Tim

more ▼

answered Aug 30 '14 at 10:25 AM

avatar image

DarthB
710 32 26 55

avatar image Green_ Aug 30 '14 at 10:27 AM

Thanks for the quick answer :D 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?

avatar image DarthB Aug 30 '14 at 10:46 AM

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

avatar image Green_ Aug 30 '14 at 12:01 PM

Oh okay, good explanation thankyou :D

avatar image Green_ Aug 30 '14 at 12:20 PM

What is the false parameter for? Can't seem to find it in the documentation

avatar image DarthB Aug 30 '14 at 12:53 PM

if you use true the BoxComponent will re-process if it overlaps with other components and generate overlap events, false will bypass this processing

avatar image Green_ Aug 30 '14 at 12:58 PM

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 :)

avatar image NeusAap Jan 07 '15 at 06:30 AM

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: http://prntscr.com/5pgifh

I hope that this makes more sence :)

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question