(Dedicated Server) Player Rotation & Line Trace By Channel

Hello, I’ve been trying to make my character rotate to the camera’s forward position when he casts a spell, and also shoot the projectile from the character’s position to the position where the camera is pointing (crosshair).

My problems are the following:
1- When the cast is successfully done on the server the “CosmicShardsCast” function is called (on the server), and then I try to rotate the player on the owning client. This function always executes but the player doesn’t always rotate (if I try to cast multiple time he will rotate in one of the time, or even many)

2- When I try to get the destination point of the spell, the first time I shoot to a direction it doesn’t go to where the camera is pointing, but then if I don’t move the camera and shoot again in the same point, he shoots to the correct point. While if I change the camera’s position and shoot again, then he doesn’t shoot correctly, and if I reshoot he shoots correctly, etc…

Below are the blueprints I’m using, they are all in my character’s blueprint:

CosmicShardsCast Function

Rotate Player

Get Shoot Point

Any help is appreciated.

Thanks in advance!

Part 2 was fixed by itself from yesterday till today, and I didn’t even change a single thing. I just opened up the project today, compiled, played, and it worked. Seems there was something bugged in unreal, weird…

But Still part 1 is unresolved, sometimes the player rotates and sometimes he doesn’t.

Still having part 2 fixed made my day :slight_smile: