PlayMaker Help & Tips > PlayMaker Help

iTween not finishing with fast interaction[SOLVED]

(1/1)

Roboboy1:
Hey guys,
I've been having some problems with itween actions not finishing esp. when the user interacts too quickly with collision objects(rapid mouse clicking, etc.). I have an itween "rotate to" action with a duration of .5 seconds which is pretty fast, but what do you do about users that rapidly click around and the action gets stuck on the itween state? Any help would be much appreciated.

jeanfabre:
Hi,

you don't get stuck in a state, create a logic that activate another state and you are good to go if your itween action "stops" on exit.

 The key is to always use the start position or rotation for your itween action using the current value and not the expected one if that itween had finished, and so it will start a new itween using the current position or rotation, that's perfectly valid even at fast pace.

Bye,

 Jean

Roboboy1:
Hi Jean,
I think that is how I have it set up already. Please see the enclosed image. I have several collision objects that send an event to their respective receivers. The receiver compares an int and if its "1" it transitions to a state with the itween rotate to. If I rapidly click the collision objects they eventually stop working. This screen cap shows where its getting hung up. Do you mean "activate another state" on the same FSM?

jeanfabre:
Hi,

 Manually send the "FINISH" event. Better create a "DONE" event tho, but this would be what I woudl experiment with.

bye,

 Jean

Roboboy1:
The extra transition did the trick. Every mesh collider now sends an event to the parent of all the receivers that calls this extra transition. Tests so far have been bullet proof. BTW - I hadn't used the parent as the target before. I guess this replaces the old broadcast method? Very nice! This will simplify several of my FSMs.

Navigation

[0] Message Index

Go to full version