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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Need to get the position of a mesh placed im my game c++

Basically i am putting some brushes around my scene and trying to spawn basic meshes on and around them. I know how to get the bounds of the meshes i place, but i don't know to get the position of the other meshes that are statically placed in the scene.

Product Version: Not Selected
Tags:
more ▼

asked Jul 07 '17 at 03:43 PM in C++ Programming

avatar image

ematto
12 1 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first
 for (TActorIterator<AStaticMeshActor> It(World); It; ++It)
 {
     AStaticMeshActor* SMA = *It;
     FVector Loc = SMA->GetActorLocation();
 }

more ▼

answered Jul 07 '17 at 03:56 PM

avatar image

cgrebeld
497 25 16 33

avatar image ematto Jul 07 '17 at 04:36 PM

Thanks for the answer, it will probably solve my problem but i've found online that to use TActorIterator i need to #include "Runtime/Engine/Public/EngineUtils.h" but when i do that all the project (which is the basic c++ one) starts giving me error that i don't have if i don't include that file (like PrimaryActorTick is not defined). I know that i'm a bit generic and i'm sorry, but can you help me?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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