Variable Reading 0 on Dedicated Sever?


So, if I am not in a dedicated sever my vector variable reads correctly. But when I start a dedicated server the variable is just reading 0,0,0. I am completely stumped!

It is replicated, and follows the same rules as all my other variables. If I don’t run a dedicated sever, but have a second player the second player’s variable reads 0,0,0 too.

What am I missing?

Difficult to say from such a small snippet. As i see it “Owner character” in this picture is actually the REFERENCE to the character and that one is replicated, Check. But is the actual character replicated? It make limited sense to just replicate the reference but not the character itself.

I am just guessing here, but the problem is likely something in that direction.

Everything was replicated. I have got it to work with rep notify weirdly. But it’s initial shot location isn’t correct (It’s not firing from the muzzle anymore). haha. Weird.

I think you’re setting something that is not rendered on the dedicated server, for this reason it is 0. That’s also the reason for the wrong location of the muzzle flash, if you’re not rendering specifially on the dedicated server, it is simply (0,0,0) as location.

Thanks for the reply! I’ve been working on it all day, and resolved the issue completely haha! Though I don’t quite remember what I did.

I am having a new issue now though, and didn’t think to start a new thread if this can be easily resolved?

Provided a video:…58-57.flv?dl=0

When holding right click the character “aims” and can effect control rotation. You move with W,A,S,D and if you’re not aiming the control rotation is set by the movement keys.

It works perfectly until I turn on dedicated server, then you get the glitching when you hold down aim and move.

To confirm the WASD controls only effect control rotation if aiming isn’t occurring.

My guess is the server and the client are providing different results and it’s conflicting?

EDIT: Actually, I think it’s an issue with referencing my player controller. It keeps returning failed, but it is still responding with the correct results from the controller :/? is it like every second tick failing haha?

Picture is from inside the Player Character.

If I can provide more information for you please let me know :slight_smile:

EDIT AGAIN: I’m an idiot, I was calling my tick on server (which updates calc move direction) BEFORE setting my control rotation… Switched them around and works perfectly.