Hi, I need some help, how can I get the character to run to my finger on the phone?
Hi there! With this type of indirect control you may use AIController on your Player Pawn and so the implementation will go the same way as it goes with NPCs. And here are main steps:
- Get Screen position of touch from input event
- Depropject Screen position to World Location and World Direction (this APlayerController::DeprojectScreenPositionToWorld | Unreal Engine Documentation, also see Deproject Screen to World | Unreal Engine Documentation)
- LineTrace from gained World Position and World Direction to define Target World Location (take a look at this UWorld | Unreal Engine Documentation, and this Traces Overview | Unreal Engine Documentation)
- Set Target For Player Pawn. You will need to configure Behaviour Tree in appropriate manner
Thank you for your answer, I’m going to get down to work and let you know what happened