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"

RAMA!!! im trying to implement a RTS selection box in C++

Hi could anyone help me out why doesnt this work? its on a tick and the anchor point is being set in a another function on lmb click the fbox part is exactly like what rama did in his seelection box node.

APlayerController* PlayerController = Cast(GetController()); if (PlayerController != nullptr) { // Get the coordinates of the mouse from our controller
float LocationX; float LocationY; PlayerController->GetMousePosition(LocationX, LocationY); FVector2D DragPoint(LocationX, LocationY); FBox2D Box; Box += AnchorPoint; Box += DragPoint; UE_LOG(LogTemp, Warning, TEXT("Your message")); }

Product Version: UE 4.15
Tags:
more ▼

asked Apr 07 '17 at 01:25 PM in C++ Programming

avatar image

adamchagg98
1 1 4 5

avatar image adamchagg98 Apr 07 '17 at 01:27 PM

i have already implemented wasd movement, zoom , pan and screen edge hit on a Pawn class(not spectator pawn) and it all works perfectly im really stuck on this

avatar image adamchagg98 Apr 07 '17 at 01:29 PM
 APlayerController* PlayerController = Cast<APlayerController>(GetController());
 if (PlayerController != nullptr)
     {
 // Get the coordinates of the mouse from our controller  
         float LocationX;
         float LocationY;
         PlayerController->GetMousePosition(LocationX, LocationY);
         FVector2D DragPoint(LocationX, LocationY);
             
         
         FBox2D Box;
         Box += AnchorPoint;
         Box += DragPoint;
         UE_LOG(LogTemp, Warning, TEXT("Your message"));
 }
avatar image Mistress Lillith Nov 15 '17 at 02:39 PM

Hi, is the code not being called or is it an issue with selecting actors once you get the Box?

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

0 answers: sort voted first
Be the first one to answer this question
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