Caster->motion says [0,0,0] most of the time
Mach12 opened this issue ยท 5 comments
This spell which basically debugs player velocity, says [0,0,0] when cast using boots, even when running.
I believe it does the position relative to the player at that point but I will take a look and test it out.
This is because the spell is fired at the same time you're jumping, so you have no velocity yet.
Let me put an emphasis on my point here:
This spell [...] says [0,0,0] when cast using boots, even when running .
Sprintjumping will also display triple 0.
I think you might be able to get the velocity by using Trick:Sleep for 1 tick. This is because the spell is fired at the same time you're jumping, so you have no velocity yet.
After testing it further, it looks like evaluating player's motion at any point in time is non functional.
Retried casting the spell from my CAD and it even says 0,0,0 if I'm freefalling or sprintjumping.
After investigating the code, it seems that a player's velocity is calculated from his current position minus the last entry in his Eidos changelog.
The problem is, that entry is often the same as the player's velocity, so I suggest using the previous entry of the log.
#180 Here's a pull request for it