|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
12-23-2008 08:39
I'd like to have an object that targets particles toward whoever touches it, and then "returns" to the object in an elliptical path, any suggestions?
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
12-23-2008 09:41
Sure. Just remember the key of the "home" prim ("remember" meaning use a global variable). Or obtain that key in a repeatable fashion such as llGetLinkKey() or a chat protocol or something. When a touch occurs, use llDetectedKey() to grab the key of the avatar, target the particles at that key, set a timer, and reset the particles with the "home" key when the timer goes off.
|
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
12-27-2008 10:43
thanks much 
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
12-29-2008 16:16
From: Hewee Zetkin Sure. Just remember the key of the "home" prim ("remember" meaning use a global variable). Or obtain that key in a repeatable fashion such as llGetLinkKey() or a chat protocol or something. When a touch occurs, use llDetectedKey() to grab the key of the avatar, target the particles at that key, set a timer, and reset the particles with the "home" key when the timer goes off. actually, you don't really need to key of the source (home). have the particles target the user, then using the timer suggested, reset the particle source with an empty target key. as long as TARGET_POS_MASK is still active, and the particle target key is empty (or the target isn't around) the particles will target their source edit: do the already rendered particles change direction if the target is changed?
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
12-29-2008 19:33
Oh. Darn. I totally misconstrued what Celty was asking for anyway I think. No, I don't believe existing particles change targets; only newly emitted ones. Hmm. I think the original idea could be done by orienting the prim so that its x-axis points toward the "target", then setting the source prim itself as the actual particle target. Wind or some static acceleration could be used to make the path elliptical (well, very roughly elliptical) rather than a straight back-and-forth line. It could be tricky if you actually want the particles to REACH the "target". Maybe impossible. But if that kind of accuracy isn't needed, it should work fine I think.
|
|
Celty Westwick
Registered User
Join date: 24 Jun 2006
Posts: 145
|
01-05-2009 08:02
The problem i have with "by orienting the prim so that its x-axis points toward the "target", then setting the source prim itself as the actual particle target." is that the target av would not be of course standing in a fixed position so the particles need to actually target the av itself.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-05-2009 08:31
From: Celty Westwick The problem i have with "by orienting the prim so that its x-axis points toward the "target", then setting the source prim itself as the actual particle target." is that the target av would not be of course standing in a fixed position so the particles need to actually target the av itself. Start a sensor used to reorient the prim, or if it is going to be a very brief period, use llDetectedPos() from the touch event itself. BTW, I think I meant the z-axis. That's the pole for particle angles. Oops.
|