How to Drag-n-Drop Circle object to a Circle Target

CulturePlayCulturePlay Member, PRO Posts: 113
edited May 2012 in Working with GS (Mac)
Ok, I'm working on a new math game and I need some help with the drag and drop system I am trying to build.

I have multiple draggable circle-shaped actors on the scene. Each of these drag-circles has a corresponding circular target area. The target-circles are organized on the scene to form a pyramid shape (eventually will have different shapes on other levels). I would like to program the game in a way that when the drag-circle moves close to the target-circle it snaps into place, otherwise on release it snaps back to it's original position.

I've looked at several videos on drag-n-drop, but I don't think they cover snapping to target or back to original position. And I don't believe they cover dragging and snapping to a circular target.

Thanks folks!

Best Answer

  • MarkOnTheIronMarkOnTheIron Posts: 1,447
    Accepted Answer
    Ok, now I understand your problem.

    It has nothing to do with the shape of the objects and targets. The problem here is with the shape of you imaginary grid that is triangular. Unfortunately my system is not applicable to your case. The only way I could see it done is by using tables were you put the coordinates of every target and then using trigger actors in your pyramid you can use the data in the table to snap the object in the target.


Answers

Sign In or Register to comment.