I'm trying to achieve a vortex action, a behavior where a particle
would oscillate along x and y to create the illusion of a vortex
motion (2D, not real 3D)
My present strategy is to create a class based on the Move class, but
add a sin and cos component to the update of the P2D particle.
This has not worked so far, because I need to update the value of the
sin and cos at each cycle (usually, a fraction of 2*PI), and the
preUpdate or update won't work with that - the value is reset at each
call, always calling the first value.
Any hints on a good strategy to achieve this? Why can't a store a
value on the action2D class and update it at each cycle? Where would
be a good place to store/update the sin cycling value?
Thanks a lot!