Hey everyone. Love the product, can’t wait to learn more and help out others once I get more knowledgable.
Question: How do i jump to a scene ONLY if a certain action is completed, for example:
Insert an Ellipse onto my scene
Insert another Ellipse
Make the first dynamic and the second static
Allow the user to change the position of the second so that he/she can push the first Ellipse around, much like air hockey Here is my question
How do I make it to where you go to a new scene ONLY IF the user pushes the ‘hockey puck’ Ellipse off of the the top of the canvas, imagine they ‘scored’
.
So, you could think of this like Air Hockey, if the ‘puck’ goes through the top and off the page, the user is brought to the next scene.
you’ve got to control the position of the ‘puck’ by either setIntervall or MutationObserver. You’re question is near to collisiondetection which isn’t yet built in …
example of MutationObeserver is within pinball. it’ll check when the ball gets of thru pins …
Awesome, thanks. Forgive me, again I’m a bit new, but when I open up the hype file (source), I am looking for the ‘pins’ or that rectangle within that section? And, where is the option to detect if the ball goes through the pins? Physics Inspector? If you could kind of guide me to the options i need to play with to get the detection, and what you did to detect (create a rectangle, or?)… thanks!
This is close to what you are trying to do, it does not push an element but it does have a drag & drop function that will go to another scene - it uses jQuery
You’ve got to script it yourself. no builtin functionality.
check the position of the puck by either setIntervall or MutationObserver with the use of getBoundingClientRect(), which returns its relative Position to the Viewport. compare this with the position of your hype scene and you’re there …
yes, with timeline you can do it.
Make a new timeline called "steps" and add 4 pauses + next scene
Add an action in JS to trigger this timeline and you're done
OK thank you for your answer! However, this method already tried
I would like to move to the next Scene but only after placing all the items on the “shelf”. Elements are dynamic and can fall from the “shelf”. Only when all 5 elements will become permanently on the shelf should take action.
I also tried the function .observerChanges but it does not work then the “On Drag: Position Control Element”.dnd-new_scene-3.hype.zip (129.3 KB)
this is true, it was not in orygialnym project. I should more accurately describe my problem, but I really would like to thank you for your help! The method which suggested h_classen should be OK.