Add Impulse not replicating

I have a blueprint for “jetpacks” and I’ve tried everything to get AddImpulse function to work. I have a dedicated server setup for when I test using PIE windows. I tried making custom events, tried making functions to add impulse, I’ve tried changing variables and functions to replicate. I can’t seem to figure it out. I have the Spacebar mapped to let the character “fly.” It works once at run. I cannot do it after the first time. Also the amount of movement on the vector it moves isn’t the normal amount if not running multiple clients and a dedicated server.

I am using the CharacterMovement component. I have tried just doing it with the “Jump” function, but it’s the same thing, it works once and then it isn’t even working properly. You move like 2 mm off the ground.

Hi there, please take a look at this thread Replication through Impulse problems - Multiplayer & Networking - Epic Developer Community Forums it might help.

Regards.

I already tried what was in this. Didn’t work sadly. I have already search extensively to find the solution. I have tried that method and the one here:

No luck :frowning:

I’m using the default mannequin provided in the default ThirdPerson template. I have tried toggle the “Simulate physics” on the mesh and the capsule component, nothing works with that. You think I should try just adding a regular pawn?

Does it replicate better to use Character Pawns not simulating physics and LaunchCharacter repeatedly instead?

Not really. Character pawns are the only thing in ue4 that has network prediction and smoothing buult in. However they only know how to donit for character movement not for simulated physics.
Ue4 simulated physics are nondeterministic so you get different results on different machines when you try to replicate their effects. So then the movement replication corrects it and you get lag jitters.
A regular non character pawn doesn’t even have the non physics smoothing.

Thats why I recommended using. Character and the launch character node if you can get it to work

Hey, so I tried checking what I was using. I am doing exactly as you say for the “Jump” function. Same thing happens. I have physics simulation off for the character’s components. I have launch character as a replicated function for “Jump” instead of the “AddImpulse” I originally thought was the only problem

Well I’m not sure if it will work. I just remember reading they did something similar in Sky Noon. I wish I had a working example to show you but to be honest I haven’t tried it myself yet. Just thinking that out of the 18 different combinations of things I have tried to get smooth networked pawn movement, nothing works better than CharacterMovement, and LaunchCharacter works for that.

Sorry I wish I could be more help! If you get it working, please tell us how you did it.

A little tip though: I think Launch Character replicates to the server without you having to put it in an RPC. If I remember correctly. If that’s the case then replicating it again will probably cause stutters.

Also a question: In what way is it not working? Is it not hovering/launching at all or is it doing it in a way you don’t want?

Hey so I got it working. I discovered that you can’t have the target be CharacterMovement, it has to be a reference to the Character. Also you can’t do Add Impulse because it can’t reference Character, it references CharacterMovement. I was able to get it working well. I also noticed I had a “Jump” function that cancelled it out too, so thanks for giving me the insight on the physics simulation and such

All right! Glad it’s working now!

Sorry to repop 2 years later but what did you use if not add impulse ?

I ended up going with setting velocity from the character movement component and replicating

I did it like this it works for me

341673-impulse.png