Forum Discussion
Motion path relartive start point- Object falling out of screen
Hi all,
I recently created a gamified learning Course using storyline 3. In this course game I have used motion paths to animate an object to move in 4 directions using 4 interactive keys on the course screen. I have set relative start points for all the motion paths so that the object starts moving from same place where the last motion path ended. But I am facing an issue and that is when if I continue to move the object in one direction then it continues moving even out of the screen. I want all the motion paths to be Limited within the slide and the object doesn't move and fall out of the screen in any case.
Please provide your valued instructions to solve this.
Thanks in advance
- PhilMayorSuper Hero
To prevent this I normally track an x,y value. I am presuming you're set up but if you have up, dow, left and right buttons. Up adds 1 to Y, down subtracts one from Y and left adds 1 to X and Right subtracts one from X. Then I disable and enable the direction arrow based off the x,y values
- NalinDubeyCommunity Member
Not able to get it right Phil, sorry about that. Can you please share a tutorial link for this if you have?.
- PhilMayorSuper Hero
Sorry I don’t have a tutorial
Sent from my iPhone
- AdamCochranCommunity Member
You could potentially add 4 rectangles outside (top, right, bottom, left) of your working area (offscreen) and set up the trigger to move the main object in the opposite direction (motion path) when your main object and the rectangles interact. Your main object will be confined to the screen and should not move offscreen without moving back onscreen when the main object hits the rectangles.
Trigger Example:
When "mainObject" intersects with "rightRectangle"
- Move "mainObject" along "Left Motion Path"Hope this helps!