# Lyra Animation Replication

**URL:** <https://forums.unrealengine.com/t/lyra-animation-replication/544749>\
**Category:** Character & Animation\
**Tags:** unreal-engine, UE5-0, question\
**Created:** [April 30, 2022, 10:24am UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749 "2022-04-30T10:24:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Van\_Hinten](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Van\_Hinten](https://forums.unrealengine.com/u/Van_Hinten)\
**Post date:** [April 30, 2022, 10:24am UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749/1 "2022-04-30T10:24:23Z")

</div>

Hi there,

Did anyone find out how animation are synced in lyra? For example, the HasAcceleration and HasVelocity variables used to transition between locomotion states are not replicated but clients play the correct animations. It is not documented and I couldn’t find anything in the game myself.

ty

---

<div class="post-metadata">

**Author:** ![JusticeArts](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justicearts/32/631155_2.png) [@JusticeArts](https://forums.unrealengine.com/u/JusticeArts)\
**Post date:** [May 1, 2022, 5:43am UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749/2 "2022-05-01T05:43:43Z")

</div>

The acceleration is replicated in c++.

---

<div class="post-metadata">

**Author:** ![wusashi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wusashi](https://forums.unrealengine.com/u/wusashi)\
**Post date:** [August 28, 2022, 1:51am UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749/3 "2022-08-28T01:51:15Z")

</div>

For anyone still looking, acceleration is replicated to simulated proxies in ALyraCharacter with the ReplicatedAcceleration struct.

They calculate the acceleration value inside the overridden PreReplication function and compress it. Then it is decompressed in the OnRep\_ReplicatedAcceleration function. From there, the replicated value is sent to the LyraMovementComponent via the SetReplicatedAcceleration function where it will override the default acceleration value that the movement component returns. They also override SimulateMovement in the movement component to ensure that the replicated value isn’t overridden by the default acceleration value.

At least that is what I made of it. 😅. Implementing this into my current setup allowed my pivot anims to replicate to simulated proxies. Without it the pivots would only play locally

---

<div class="post-metadata">

**Author:** ![II\_KiAx\_F0X\_II](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ii_kiax_f0x_ii/32/716329_2.png) [@II\_KiAx\_F0X\_II](https://forums.unrealengine.com/u/II_KiAx_F0X_II)\
**Post date:** [February 3, 2023, 12:37pm UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749/4 "2023-02-03T12:37:54Z")

</div>

Temporary fix here [[HOW TO] Replicating Lyra Animations In Clean Project - #2 by II\_KiAx\_F0X\_II](https://forums.unrealengine.com/t/how-to-replicating-lyra-animations-in-clean-project/762907/2)

---

<div class="post-metadata">

**Author:** ![999186](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/999186/32/1034253_2.png) [@999186](https://forums.unrealengine.com/u/999186)\
**Post date:** [March 8, 2024, 9:31am UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749/5 "2024-03-08T09:31:38Z")

</div>

Yes, my friend!  
After I finished making a simple version of Lyra’s Locomotion (including synchronization groups, etc.), I found that TurnInPlace and AimOffset worked normally, but acceleration-based data-driven animations such as starting, emergency stop and direction changes were inconsistent between clients. is not getting replicated, so we need to network replicate the acceleration.  
I show the process as follows (assuming you are trying to fork Lyra in a new project):  
In Lyra’s SLN file, you only need to find LyraCharacter.h and LyraCharacterMovementComponent.h, and copy these codes. It should be noted that FObjectInitializer needs to be used in the constructor of LyraCharacter to set LyraCharacterMovementComponent as a sub-object and CASTCHECKED, so that the acceleration will override the default value of the motion component.

 ![微信截图_20240308171754](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/a/3bac8e184c058c07a8280d430a6d85ad52791911.jpeg)  
 ![微信截图_20240308171854](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/3/6435114b75e9ead91e829853c717805760f6ad88.jpeg)  
 ![微信图片_20240308173116](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/6/1369bc73675daefb721c678310f274eafaadbbfc.png)

---

<div class="post-metadata">

**Author:** ![reisandbeans](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/reisandbeans/32/88718_2.png) [@reisandbeans](https://forums.unrealengine.com/u/reisandbeans)\
**Post date:** [September 23, 2024, 5:21pm UTC](https://forums.unrealengine.com/t/lyra-animation-replication/544749/6 "2024-09-23T17:21:55Z")

</div>

@999186 you mentioned something about TurnInPlace and AimOffset in your reply. Would you happen to know how those are replicted?
