Cant get mouse location in client
I'm trying to make a event that faces the player towards the mouse and then creates a projectile heading that direction. I have it working great in single player, but when I try it on the client it faces the cursor correctly, but it doesn't spawn the projectile in the right direction.
To get the mouse location I'm reading the hit result under cursor into a variable, which is then finding the look at rotation between that and the player to set the rotation. I'm then using that same mouse location variable to set rotation of the projectile, because if I just use the player rotation it's not always firing the right way.
This is really messing with my head, since I'm reading the mouse location in as a variable which the client is apparently reading to get its new rotation, but it's somehow being lost when I pass it to the actor spawning the projectile, but only as the client, the host is working as intended.
The client rotates towards the mouse perfectly, but the projectile is always created facing the origin, the server is functioning flawlessly.
In the images, "SC_Firebolt" is an actor spawned in and owned by "BP_BasePlayerCharacter".
Follow this question
Once you sign in you will be able to subscribe for any updates here