x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.19
Tags:
more ▼

asked Oct 11 '18 at 06:05 AM in Blueprint Scripting

avatar image

FeFiFoChizzle
6 1

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hi there, please take a look at this thread https://answers.unrealengine.com/questions/381657/replication-through-impulse-problems.html it might help.

Regards.

more ▼

answered Oct 11 '18 at 06:16 AM

avatar image

ZDron3
66 1 6 7

avatar image FeFiFoChizzle Oct 11 '18 at 07:15 AM

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: https://answers.unrealengine.com/questions/828647/add-impulse-to-clients-character-movement.html

No luck :(

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered Oct 11 '18 at 06:58 AM

avatar image

mightyenigma
3.6k 16 17 13

avatar image FeFiFoChizzle Oct 11 '18 at 07:16 AM

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?

avatar image mightyenigma Oct 11 '18 at 07:21 AM

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

avatar image FeFiFoChizzle Oct 11 '18 at 07:37 AM

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

avatar image mightyenigma Oct 11 '18 at 10:02 PM

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?

avatar image FeFiFoChizzle Oct 12 '18 at 12:39 AM

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

avatar image mightyenigma Oct 12 '18 at 06:49 AM

All right! Glad it's working now!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question