Ghost follow player's trajetory inaccurate
I've added additional functionality to example 2d character, so it each TICK adds 2 variables about it's movement in the array, movement axis in float, which I get from InputAxis MoveRight, and is space bar pressed or not. Then, when i press Q, already created character, named Ghost, which is copy-pasted player character with some blueprint changes in it, repeats actions, based on the array created by player character. But ghost repeats it very innacurate, sometimes it stuck or finishes in wrong place. Is it because I use event tick to add and read movement info from the array? If yes, which node can replace event tick?
asked Jan 06 '18 at 01:30 PM in Blueprint Scripting
Hey there, it kind of depends on the approach you want. If you want the ghost to completely mimic the movement you did earlier without taking into account the dynamic environment, then you can store locations and rotations each frame and play those back. If you want the dynamic environment to affect the playback then you store the movement inputs like you are doing and play those back. Having said that, if you still want to store the movement inputs and not the transforms, then you ideally need to lock fixed fps to have a more deterministic behavior on the playback, see if that helps.
answered Jan 06 '18 at 03:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here