I went for option 3, in fact. I've done a little JS patch to handle
initial position and do a hit-test on mousedown based on mouse
distance from the centre of the billboard, then move the billboard.
Now I have to extend it to take a structure of initial positions and
loop through it looking for hits when the mouse is pressed, keep
track of individual position values in a structure and do the logic
to make sure they can't be dragged past each other horizontally. I
can then feed this into an Iterator.
a|x
On 3 Jun 2010, at 16:01, Chris Wood wrote:
Couple of options:
1. Don't use an iterator at all. Just build say 20 (or however many
you need at maximum) macros, with your interactive billboard in each.
Use your iteration count to disable macros you don't need (with math
exp patch, "count < macroNumber" connected to the enable input works).
This way you get rid of all the issues around iterators, and a free
speed boost! Of course it can get painful with large numbers ;)
2. Forget using the interaction patch and do it the old fashioned way.
There's a hit test patch you can use to check for mouse clicks within
a rectangle (I did something similar to what you're looking for a
while back, but without an iterator). The iterator is still going to
cause issues unfortunately..
3. Write your own click detection and billboard moving stuff in
javascript. This will make life much easier, if you don't mind the
coding..
Good luck with it!
Chris
On 3 June 2010 15:50, Alex Drinkwater <[email protected]> wrote:
Hi JeanMarc,
thanks for the example. I think I knew about the possibility of
getting a structure out of an Iterator, but my problem is more
about the Interaction patch, and making that work with iterated
billboards. It's turning out to be trickier than it should be...
Cheers,
a|x
--- On Thu, 3/6/10, JeanMarcNoel <[email protected]> wrote:
From: JeanMarcNoel <[email protected]>
Subject: Re: Programmatic Billboard/Sprite Position and Interaction
To: "Alex Drinkwater" <[email protected]>
Cc: [email protected]
Date: Thursday, 3 June, 2010, 15:13
Hi Alex,
You can eventually separate the process in 2 steps :
- one iterator that only computes the maths - assembles the
results as a structure (with javascript) and outputs a
structure (only with 10.6)
- the second iterator take this structure and renders the
geometry.
Here is a simple QC 4 demo :
JeanMarc
Le 3 juin 10 à 15:36, Alex Drinkwater a écrit :
Next problem:
I need the billboards to not be able to be dragged
past each other on the x-axis. Which means keeping track of
the position of each then creating some simple logic to
limit their movement. Clamping movement to particular bound
is easy, but the problem then becomes getting the positions
of the other billboards inside the Iterator, since each
iteration needs to know the position of the billboards in
the previous and next iterations. But... you can't get
values from other iterations, and because the Iterator had a
billboard in it, it's turned blue, and therefore can't have
an output....
a|x
On 3 Jun 2010, at 14:20, Alex Drinkwater wrote:
Ah, that does the job!
Thanks George.
a|x
--- On Thu, 3/6/10, George Toledo <[email protected]>
wrote:
From: George Toledo <[email protected]>
Subject: Re: Programmatic Billboard/Sprite
Position and Interaction
To: "Alex Drinkwater" <[email protected]>
Cc: "quartzcomposer-dev list list" <Quartzcomposer-
[email protected]>
Date: Thursday, 3 June, 2010, 13:51
The offsets on the interaction patch work inside
of an iterator, so you can use them to setup initial
positions (to some extent). See attachment.
-George Toledo
On Thu, Jun 3, 2010 at 8:39 AM, Alex Drinkwater
<[email protected]>
wrote:
There's probably a really simple answer to this
one, but I can't currently see it.
I'd like to programmatically set the initial
positions of several sprites/billboards, but I'd also like
to be able to subsequently drag them to new positions with
the mouse.
I'm not quite sure how to approach it, to be
honest.
Anyone any thought?
a|x
http://www.toneburst.net
_______________________________________________
Do not post admin requests to the list. They will
be ignored.
Quartzcomposer-dev mailing list
([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/
gtoledo3%40gmail.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will
be ignored.
Quartzcomposer-dev mailing list
([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/
the_voder%40yahoo.co.uk
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be
ignored.
Quartzcomposer-dev mailing list
([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/jm%
40yanomanow.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer-
[email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/psonice%
40gmail.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]