Object collision for animating object and dragged object only works while actively dragging

Jul 11, 2017

I am working on an SL game with motion and collision detection but ran into a hiccup. While dragging an object, if it intersects an animating object, the collision is detected and an action occurs but if I stop dragging the object (and I do not release the drag) if the animating object intersects my dragged object, the collision is not detected.

The collision is only detected if it happens while I am actively dragging the object.

In a nutshell, I have a circle that I am trying to drag to a box on the other side of the canvas. Between those two, I have a spinning windmill. If I touch the windmill while dragging the circle, the collision is detected. The problem is that if I stop dragging the circle and the windmill passes over the circle, then the collision is not detected.

 

5 Replies
Garfield StHilaire

Hi, Crystal. Thanks for your help. I have attached an SL3 file. The file has 2 slides which show two different examples of the issue I am having.

Slide 1:

This slide shows a blue circle, green background, and blue target box on the right. The green background animates towards the left and has a trigger that goes off when the green background and blue circle no longer intersect. The goal is to get the blue circle to the blue target box before the green background animates to far to the left.  If I drag the blue circle past the green background then the trigger runs correctly and it recognizes that they no longer intersect. If I do nothing and let the green background slide past the green circle, again, the trigger runs correctly but if I start dragging the blue circle, pause (and do not release) and let the green background slide pass the blue circle, the trigger does not go off even when they stop intersecting.

Slide 2:

This slide has a blue circle, a spinning cross and a blue target box on the right. The goal is to get the blue circle to the blue box without hitting the cross. If I hit the cross while dragging the blue circle, the trigger goes off correctly. But if I start dragging the blue circle and stop (without releasing) and let the cross animate over the blue circle, the trigger does not go off even though they intersect.

Thanks for any help you can provide.

Crystal Horn

Hi again, Garfield.  This is a tough one!

Slide 1:

I changed the "stopped" and "good" layer properties to allow the user to click on the base layer and to not pause the timeline of the base layer.  Once either layer shows, I lost control of the oval (which is a base layer object).  I was hoping that would help.

I was able to get the stopped layer to appear when the oval and the green rectangle no longer intersected  when I stopped dragging and held the oval still.  The layer didn't appear immediately, though.  It was as though it waited for the motion path of the rectangle to complete.

Slide 2:

I tried a few different setups to make the object intersect trigger work when the oval was just hovering and not actively moving, but I didn't get consistent results.

For both of these scenarios, I'm going to document and research this behavior a little more.  I want to better understand how the object intersect trigger is designed to work with moving and hovering objects.

I'll keep you updated on what I find!

This discussion is closed. You can start a new discussion or contact Articulate Support.