how to use "MovetoLocation" to move character
please excuse my stupidness if i am doing something simple wrong but i am new to developing with unreal engine. What i am trying to do is move my character from start of maze to end of maze and have accomplished it using blueprints but i want to implement it in c++.
I Have assigned my characters AI Controller Class to my AIController.
in my AiController class i have
and then in my Characters
When i go to play it just dose nothing.. any help greatly appreciated as it has been annoying and hold me up all day
asked Nov 25 '15 at 06:14 PM in C++ Programming
The AI Controller should automatically possess the character when it spawns so you should be able to remove that bit. To get a reference to the controller you should call GetController instead of StaticClass.
Try replacing your BeginPlay function with this
In your character constructor, make sure to set the default controller class (you do use StaticClass here):
Well, if it doesn't cast to
There's a lot of places where stuff could have gone bad for you, so it's a wast of time trying to solve it via an answerhub thread. Just look at samples.
answered Nov 25 '15 at 07:33 PM
Take a look at the UE4 sample project TopDown in C++. In that project the character moves where you click. This is done using the function MoveToLocation(...). It is very simple and well documented.
Hope this helps!
answered Nov 28 '15 at 03:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here