This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| prpl:getparticlemotion [2016/12/02 23:34] – external edit 127.0.0.1 | prpl:getparticlemotion [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| <- [[.: | <- [[.: | ||
| - | ===== | + | ===== |
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| - | | | | [ - ] | | + | | PID | dY dX | [ int - float float ] | |
| === Description === | === Description === | ||
| + | Returns the (pixel) velocity of a given particle, in the form of the movement (excluding teleports) from the previous frame. Returns dY first, probably for easy use with [[.: | ||
| === Examples === | === Examples === | ||
| - | < | + | < |
| - | stack.Push(new Data(td.y)); | + | < |
| - | stack.Push(new Data(td.x)); | + | dup2 atan2 Trace #Movement direction |
| - | + | swap Trace2 #X, Y order | |
| </ | </ | ||