Hi,
awww I am freaking out hereEverything only works half as it should be.
Alright, I am using the spectator mode (in CPlayerController) as battlecam/commander mode/tactical cam - you know what I mean? This is in a state. Within it I handle camera movement as well as move control.
Now I want to command some units. The basic guess is that in commander mode the playercontroller is reponsible for looking and ordering therefore all my units must be possessed by the AIController->UTBot.
And this is where the trouble starts.
I initialise the AIController as well as the Playerpawn via spawn(). I let the Ai possess my player pawn. If-checks are implemented.
On mouse down the pawn should move to the deprojected position which it doesnt.
SetLocation (as test version) simply places the pawn somewhere on the map - if at all. MoveTo (I know, but it is only for testing) gives kind of a reaction as the pawn seems to make a step. After some clicks it disappears.
I tried both the playerpawn as well as the AIController. Both references are valid shown in the log.
What am I making wrong?
Possible errors:
- spectator mode inappropriate (please nooo)
- screen to world functinos messed up (I tried deproject as well as an own version I found in the wiki - both are fed with the mouse position - so there cant be anything wrong, can it
- wrong controller handling.
- any conflicts with (unconsciuos) editor placements on the map
- after hours of trial and errors I just dont see the wood for the trees
I hope that describes it reasonably as I have the code on my desktop PC
Help!
Regards
guinepig



Everything only works half as it should be.
Reply With Quote


Bookmarks