Actor tick called twice or more before animation tick?
Hi. I've been developing a first person sword fighting game with LAN connection. One of the players acts as the server too. For moving the sword, we are using blend spaces from pose to pose and we move that position based on input.
For different reasons we are calculating velocity by getting the difference between the position of a socket this frame and the last frame. However, for some reason it looks like this is being called twice and not giving a chance to the animation to move the sword, resulting in velocity being 0 or close to 0 and this screws other calculations based on this value, but the thing is that this only happens on the second player (the player that joins the match).
Here is the code:
Gets called in the tick function:
USocketData is our own class and this is the function that calculates velocity:
Here are some screen shots:
This is the player 1 playing an idle animation. Note that the values being printed are never 0
This is player 2 doing an idle animation as well. Note the zeroes
This is player 2 again but now he is doing a swing. Note the higher values but there still are some odd zero values in there.
This is really important since we are using this value to calculate damage and this bug is resulting in doing virtually zero damage when it should be otherwise. I've been trying to solve this all day with no success, maybe I'm forgetting something obvious. Any help will be immensely appreciated
asked Mar 01 '16 at 03:36 AM in C++ Programming
Follow this question
Once you sign in you will be able to subscribe for any updates here