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"

how to move character with mouse click?

i m sorry for poor English. I'd like to move to the destination with mouse click. (destination = mouse click pos)

 void ABaseCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent){
     InputComponent->BindAction("GetMousePos", IE_Pressed, this, &ABaseCharacter::GetMouseClicked);
 // Called every frame
 void ABaseCharacter::Tick( float DeltaTime )
     Super::Tick( DeltaTime );
     //or GetMouseCliecked HERE?
 void ABaseCharacter::GetMouseClicked(){
     FVector2D mousePos = FVector2D(0, 0);
     APlayerController* pc = GetWorld()->GetFirstPlayerController();
     pc->GetMousePosition(mousePos.X, mousePos.Y);
     FVector worldPos = FVector(mousePos.X, mousePos.Y, 0);
     FVector dir = FVector(0, 0, 0);    
     pc->DeprojectMousePositionToWorld(worldPos, dir);
     AddMovementInput(worldPos, Speed);    

Did I do anything wrong in code?

and How do I make a mouse show when I play games?

What should I do? I need help ...

Product Version: UE older version
more ▼

asked Aug 01 '17 at 02:26 PM in C++ Programming

avatar image

17 3 6 9

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

1 answer: sort voted first

Yes probably a couple things. I would suggest to you that you create a new UE4 C++ Project of Top Down Template. Learn from the Code its easier to explain it here.

more ▼

answered Aug 01 '17 at 03:11 PM

avatar image

7k 143 28 172

avatar image lueha55 Aug 02 '17 at 10:48 AM

I don't know how to use it. Could you explain it a little bit more?

(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