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"

Why is the AimOffset not replicating?

I can't seem to figure out why my AimOffset is not replicating.

Here is a clip of what's going on:

https://drive.google.com/file/d/0B0eV5r9stGxaY3BLZldHbndyWU0/edit?usp=sharing

Everything else in regards to the player animation is replicating without me needing to change anything. So I'm not sure what's different about AimOffsets.

Thanks.

Product Version: Not Selected
Tags:
more ▼

asked May 20 '14 at 12:03 AM in Blueprint Scripting

avatar image

W1930U7
331 6 10 219

avatar image TheMunky Jan 29 '16 at 02:45 AM

Is this all you would need to replicate aim offsets? I have your set up other than my characterbp sets the "Pitch" variable on the animbp because my cast's fails, yet still my aim offset doesn't replicate, do I need to do anything else?

avatar image W1930U7 Jan 29 '16 at 12:59 PM

If I understand you correctly, the answer to your question is yes. I got it working by having pitch set in the CharacterBP. So to copy what I'm doing here, you'll need to figure out why your cast isn't working.

I've refined this quite a bit since posting this question and made a tutorial. See this forum post: https://forums.unrealengine.com/showthread.php?89892-AimOffset-and-Turn-in-Place-Animation-Replication&p=411490#post411490

avatar image TheMunky Feb 01 '16 at 04:48 AM

Yeah got it working and I understand it alot better now, Thanks, I didn't know that the Update Animation was called on the server too and the cast wasn't working due to it being applied to a dodgy Character mesh, it's been fixed now.

avatar image Andrea92 Dec 10 '16 at 09:53 PM

Hello guys ... I have a similar problem, just move the mouse (Pitch) you create a strong lag in the movement and I can not understand the cause ... Any of you solved the problem?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Found the solution: Instead of doing the math for pitch (which controls the AimOffset) in the Animation BP, I switched it all over to the character BP. Created a variable named pitch in the character BP, set it to replicate, and used a custom event to set the pitch on the server. In the Animation BP, I just use a cast to get pitch from the character BP and have it set another variable named pitch that's used to control the AimOffset animation.

That probably didn't make sense, but maybe it will help someone. alt text alt text

more ▼

answered Jun 02 '14 at 01:00 AM

avatar image

W1930U7
331 6 10 219

avatar image Meowzie Jul 13 '14 at 07:02 PM

Ty, it works with anything regarding Animation Blueprints!

avatar image nopunintendo Aug 22 '14 at 09:09 PM

Thanks so much for posting this solution! Worked perfectly for me.

avatar image Nemecys Dec 18 '15 at 11:59 PM

Worked great for me too and I was using an AnimBlendSpace not just a 1D BlendSpace,

Function works great with both Pitch and Yaw,

avatar image bombe93 May 05 '16 at 09:29 AM

Thanks it works

avatar image ThiagoUriel May 28 '16 at 08:05 PM

Yes, nice solution. And as stated, it works with both Pitch and Yaw. Thanks for that.

avatar image StillAlive039 Jul 16 '16 at 10:43 AM

Thanks for the solution fixed my problem too

avatar image RajenPL Jun 02 '17 at 06:30 PM

Man you are awesome! Thank you soo much!

avatar image mertyildiran Aug 03 '17 at 10:13 AM

Thanks a lot! This answer the correct way to implement Aim Offset for multiplayer/networking.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

this is fine if youre not looking down the scope - client asks server to update pitch and then server tells client to update, makes for very laggy movement which looks pretty bad. Id need to move aimoffset locally and then tell the server to try keep up

any1 know of a way to do this?

more ▼

answered May 11 '16 at 01:47 PM

avatar image

GoatOfDeath
46 1 6

avatar image organicFoil Jan 12 '17 at 06:25 AM

i solved this problem, works fine, without lags

screenshot_1.jpg (100.3 kB)
screenshot_2.jpg (103.9 kB)
screenshot_4.jpg (47.0 kB)
avatar image pink_pony Aug 03 '17 at 05:40 PM

organicFoil This is the smoothest replicated version I have seen, thanks so much!

avatar image SenToRious Oct 24 '17 at 12:33 AM

Of course It's smooth that's because you're doing it in the event tick which I strongly advice against it, your bandwidth will suffer from it, plus not all clients have the same frame rates.

avatar image MADHOUSE Feb 13 '18 at 06:01 PM

Do NOT spam RPC calls on tick! You will totally destroy the games bandwidth in half a second, and the more players you have in a game the worse it will get. The server already has a replicated variable of the players pitch... Its in the player controller, just get that and update a replicated variable that other players then can retrieve to update animation states etc, with zero RPCs used.

On server in pawn bp: Get Control Rotation > Set "RotationVariable" (replicated) and there you go!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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