Context :
I am making a game with many entities that are trying to reach the player to attack him.
Initial system :
I made an Enemy blueprint that is a child of the character class. The character movement component was taking the root motion data from the animation to apply it on the location of the actor. The rotation to face the player was manually calculated and applied ( I need to be able to stop the enemy from facing the player). Result of this : +4ms in my gamethread, the majority comes from the CharacterMovementComponent that is taking a huge amount of time to process the tick every frame. 4 ms for only 24 enemies… Here is a screen of the time that it take for 6 enemies.
So I decided to remove this component, beceause for me it is literally impossible to use it for a video game with many entities. But now I still want to use root motion from my animations. How can I extract them ? Am I even able to do it ?
Thanks in advance to those who will try to help me ^^