Reputation:
Earlier in the day i figured out why my game doesn't work on multiplayer. The reason is that I use the "get player controller" which gives me the index 0 so i can't work. But i use this to get location where my player has to look at (for the get hit result under cursor) and I also use that for make spawn the projectile that my player launch.
Do you have an idea of what i could use to make my game work on multiplayer.
Here are 2 screen. Let me know if you need some other informations.
event to launch a projectile; function rotate to face cursor
Upvotes: 0
Views: 27076
Reputation: 61
Remember that you cannot get a client's player controller from another client. Controllers exist only on server and who owns it (the player).
Upvotes: 3
Reputation: 31
On the Character or Pawn, you can simply use GetController and cast it to a PlayerController
Upvotes: 3