Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

[PRISM] Grouped/relative behaviour when moving emitter
Started by andrewmurraywhite7 Feb 08 2016 12:34 PM

2 replies to this topic

Best Answer Caleb P , 11 February 2016 - 03:58 AM

Sorry for not answering sooner.

 

I can't believe it, but I actually left this functionality out of the library! I've just pushed an update to the repo, however, which fixes it. Download the latest commit, then:

emitter.emitX, emitter.emitY = carExhaustPipeX, carExhaustPipeY
-- This is relative to the emitter, so (500, 500) when the emitter.x/y is (500, 500) will result in a perceived position of (1000, 1000). Localize the coordinates to position it at a single point.

- Caleb

[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

andrewmurraywhite7

[GLOBAL: userInfoPane.html]
andrewmurraywhite7
  • Observer

  • 3 posts
  • Corona SDK

Hi Caleb,

When I move the emitter (attached to my physics object) this moves all particles relative to the emitter. Do I need to insert particles into a separate display object to prevent this behaviour? Is there a cleaner way of doing this? e.g. smoke from an exhaust; car goes faster; want emitted particles to be left behind rather than staying in synch when I change emitter.x

Thanks for a great toolset by the way!

Cheers,

Andrew



[TOPIC: post.html]
#2

Caleb P

[GLOBAL: userInfoPane.html]
Caleb P
  • Corona Geek

  • 1,424 posts
  • Corona SDK

  Best Answer

Sorry for not answering sooner.

 

I can't believe it, but I actually left this functionality out of the library! I've just pushed an update to the repo, however, which fixes it. Download the latest commit, then:

emitter.emitX, emitter.emitY = carExhaustPipeX, carExhaustPipeY
-- This is relative to the emitter, so (500, 500) when the emitter.x/y is (500, 500) will result in a perceived position of (1000, 1000). Localize the coordinates to position it at a single point.

- Caleb



[TOPIC: post.html]
#3

andrewmurraywhite7

[GLOBAL: userInfoPane.html]
andrewmurraywhite7
  • Observer

  • 3 posts
  • Corona SDK

Thanks Caleb - much obliged, and thankyou for such a prompt update and response!

Cheers,

Andrew




[topic_controls]
[/topic_controls]