Forum

Application not responsive while transformation is going on

17 October 2016 17:30 #12787
Hi,

1) I am trying to animate an object (cube, plane etc.) when user hit some objects in scene say some buttons.
To achieve that I created Logic editor and add "Transform Object" when user hit some button with duration "1" second. I observed that application doesn't respond to mouse click when this transformation is going on. Application respond only when duration of 1 second is over.

Kindly suggest whether this is normal behavior or not and how to bypass it. I want user should be able to hit as many buttons as possible whether transformation is going on or not.

2) I haven't used any timeline or animation to achieve this effect. Kindly suggest if I create timeline/animation and use it to animate object for any mouse touch then during animation will application be responsive.

3) I want to create some animation in such a way that if user hit some other button then current animation/transformation should immediately come to END and start new animation/transformation.

Kindly suggest whether it's possible with Logic editor?

with regards
Raja W. Husain
17 October 2016 18:37 #12790
Hello!

Kindly suggest whether this is normal behavior or not and how to bypass it. I want user should be able to hit as many buttons as possible whether transformation is going on or not.
This is normal behavior. The next node in the specified branch (every branch starts with an "Entry Point") will be processed only after "Transform Object" node finishes its transformation.
But you can create some more logic branches which will be responsive for certain transformations to process them simultaneously

2) I haven't used any timeline or animation to achieve this effect. Kindly suggest if I create timeline/animation and use it to animate object for any mouse touch then during animation will application be responsive.
"Play Animation" node has "Do Not Wait" option which allows to process the upcoming node immediately so that logic branch doesn't stuck during animation playing.

3) I want to create some animation in such a way that if user hit some other button then current animation/transformation should immediately come to END and start new animation/transformation.
Could you specify a little what do you need (some example blend file would be nice)
Blend4Web Team - developer
18 October 2016 09:07 #12806
Hi,
OK, so for 3) Idea is that

1) We have few buttons in the scene (textured Plane with hit testable property enabled) e.g. button_1, button_2, button_3.

2) We have some object(s) in scene, say cube which will animate to different transformations (position, rotation and scale) for each button click.

3) When user click button_1 cube will transform from default transformations_def (position_def, rotation_def, scale_def) to transformations_1 (position_1, rotation_1, scale_1) with some duration say 1 second.

4) If User click button_2 then cube will transform from it's current transformations to transformations_2 (position_2, rotation_2, scale_2) with some duration say 1 second and so on.

5) Here if user click button_2 or button_3 while object is still animating then application won't respond. This is not desirable.
What I want is even if object is animating, application should respond to mouse click for button_2 and button_3 and stop current animation and start new animation i.e. transformation_current to transformation_2.

kindly suggest whether this scenario is possible with blend4web with minimal effort.

with regards
Raja W. Husain
 
Please register or log in to leave a reply.