Forum Discussion
Storyline 360 drag-and-drop issue: object moves away from cursor after state change
Hello ArminBaghaei . I was able to understand your problem by reproducing it in my own file. The problem obviously stems from the significant difference in the size of your object depending on its state. When you click on the bottom (for example) of the object in the “Correct Zone” state to reposition it, you’re still moving a ‘shape’ that’s 328 pixels tall, even though it reverts to its “Normal” state, which is 48 pixels tall. This is why it seems like the cursor is pointing into thin air.
A small piece of JS code seemed like the most promising solution, but as usual with the AI Assistant, it was a three-hour struggle with no results. I did manage to realign the object in its Normal state under the cursor as I moved it (with a few lines of code that force the object to follow the cursor), but then, when I tried to cancel that forced tracking, set the object’s coordinates to that centered position, and restore the object’s original draggable functionality: the Assistant couldn’t code it correctly (and neither could I, of course). Maybe some tech-savvy folks can help you with this.
So, I can only offer you a small workaround—it works, but it’s just a workaround. At the same time, is what you’re looking for really essential for the success of the activity and for memorizing the information? However, I’m just like you: I like to dig into a problem when I encounter one.
You can apply a motion path of 0 pixels and 0.1 seconds to your object and create a trigger: Move Object along this path when its state is Normal. That's it.
As soon as you move the object out of its drop zone, it instantly returns to its original position: you don’t have time to notice that the cursor and the object aren’t aligned. That’s the workaround.
This is better than adjusting the drag-and-drop options with “Return object to starting point…” because if you don’t release the selection on the object, you’ll still see the misalignment.
I hope this helps.
- ArminBaghaei2 hours agoCommunity Member
Hi. Thanks a lot. I did try to do the same thing using the SL AL and ChatGPT. It is working only for less than a second and then it does the same thing. I mean, it can hold the dropped object for let than a second and then changes to its Normal state. I think Ronald is right. I need to use the same size objects for two the two actions... I am giving up too.