How to offset particles from point of origin

Posted by Sun on Game Development See other posts from Game Development or by Sun
Published on 2012-09-09T23:19:36Z Indexed on 2012/09/10 3:49 UTC
Read the original article Hit count: 181

Filed under:
|
|
|

Hi I'm having troubles off setting particles from a point of origin. I want my particles to spread out after a certain radius from a the point of origin. For example, this is what I have right now:

enter image description here

All particles emitted from a point of origin. What I want is this:

enter image description here

Particles are offset from the point of origin by some amount, i.e after the circle. What is the best way to achieve this? At the moment, I have the point of origin, the position of each particle and its rotation angle. Sorry for the poor illustrations.


Edit: I was mistaken, when a particle is created, I have only the point of origin. When the particle is created I am able to calculate the rotation of the particle in the update method after it has moved to a new location using atan2() method.

This is how I create/manage particles: Created new particle at enemy ship death location, for every new particle which is added to the list, call Update and Draw to update its position, calculate new angle and draw it.

© Game Development or respective owner

Related posts about XNA

Related posts about c#