Forum Discussion
mahbag-e8b66d7e
3 years agoCommunity Member
Variables that show continuously x and y an object that is moving with motion path.
Hello. I want to see contiuously the position of an object (X and Y) that is moving with motion path in two variables and the object to go to a specific point with a specific X and Y after click o...
MathNotermans-9
3 years agoCommunity Member
As Gsap is default built into Storyline360 this code would do the trick.var myElement = document.querySelector("[data-acc-text='someAccName']");var elXPos = gsap.getProperty(myElement, "x", "px");var elYPos = gsap.getProperty(myElement, "y", "px");console.log("x: "+elXPos+" | y: "+elYPos);
Whether it works with Motion Paths has to be tested though.
- mahbag-e8b66d7e3 years agoCommunity Member
Hello and thanks. I will try and see if I can use Gsap in motion Path or not?- MathNotermans-93 years agoCommunity Member
You have to ensure a loop... every second or so get the updated values.
- mahbag-e8b66d7e3 years agoCommunity Member
Hello, thanks.I made a repeating timer and put the code inside it and gave a motion path to an object, but the position of the object is not visible in the variables.
Related Content
- 12 months ago
- 8 months ago
- 12 months ago
- 12 months ago
- 12 months ago