User Tools

Site Tools


prpl:getparticlemotion

<- PRPL reference <- Everything Else 2

GetParticleMotion

ArgumentsResultNotation
PID dY dX [ int - float float ]

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 atan2. Note that SetParticleMotion accepts the arguments with dX first.

Examples

<-Particle GetParticleMotion dup2 Trace2
dup2 atan2 Trace #Movement direction
swap Trace2 #X, Y order
prpl/getparticlemotion.txt · Last modified: 2017/03/17 21:47 by GoodMorning