ParticleSystem - setPosition() vs moveTo()

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
sphyrth
Party member
Posts: 260
Joined: Mon Jul 07, 2014 11:04 am
Contact:

ParticleSystem - setPosition() vs moveTo()

Post by sphyrth »

I did some basic testing, and they don't seem to be all that different... only that I have to take the wiki's word and consider moveTo() to be better-suited for love.update(dt).

But if that's the case, shouldn't setPosition() be defunct? or at least rename moveTo() to setPosition()?
User avatar
zorg
Party member
Posts: 3444
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: ParticleSystem - setPosition() vs moveTo()

Post by zorg »

Not if internally they do different things.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
ReFreezed
Party member
Posts: 612
Joined: Sun Oct 25, 2015 11:32 pm
Location: Sweden
Contact:

Re: ParticleSystem - setPosition() vs moveTo()

Post by ReFreezed »

The two functions are completely different. setPosition() teleports the emitter instantly while moveTo() interpolates the position between frames. The higher the particle spawn rate is the clearer the difference is.

It's like comparing love.graphics.points() and love.graphics.line().
Tools: Hot Particles, LuaPreprocess, InputField, (more) Games: Momento Temporis
"If each mistake being made is a new one, then progress is being made."
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 87 guests