1. Anders Ruud
  2. love

Issues

Issue #599 resolved

ParticleSystem vertical/horizontal acceleration

hahawoo
created an issue

I propose that setGravity be renamed to setVerticalAcceleration becaaause...

  • setVerticalAcceleration is abstract, like the other particle system names. (setTangentialAcceleration isn't called setWindSpeed, you know what I mean? :D)
  • setVerticalAcceleration is more descriptive, and has an obvious meaning. It isn't necessarily completely obvious that "gravity" is synonymous with "vertical acceleration".
  • setGravity kind of assumes how it will be used.

I also propose that there be a setHorizontalAcceleration method too to go with it.

Comments (3)

  1. hahawoo reporter

    Sure, so something like setLinearAcceleration(direction, acceleration) or (acceleration, direction) or with another function like setLinearAccelerationDirection so acceleration and direction can be changed independently?

    Would setting the direction and acceleration be more useful than setting the components individually? I have no idea! :D

    setHorizontal/VerticalAcceleration are simpler in some ways.

    If the function is setLinearAcceleration(direction, rate) or (rate, direction), the order of arguments has to be decided and memorised, or if rate/direction can be changed independently there probably will be a default direction (I guess 0 like the default emitter direction).

    Also it's easier if someone just wants to set horizontal or vertical acceleration. For example the equivalent of setGravity(10) would just be setVerticalAcceleration(10), instead of something like setLinearAcceleration(math.rad(90), 10).

  2. Log in to comment