Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: jasperPT on May 28, 2013, 05:21:03 PM

Title: Drag and Drop
Post by: jasperPT on May 28, 2013, 05:21:03 PM
So Im trying to get a drag and drop functionality on to my pet game.

The idea is that you can drag some food over the pet, and drop it on the pet to eat it.

So far I have 2 tags set up "Character" and "Food"

I have an FSM set up that gets mouse down, if food is picked then the food game object follows the mouse around using the Drag RigidBody script.

This all works fine, however I am trying to figure out how to set it up so that the game knows if food is being dragged over or close to the Character and then deciding to send an "eat food" event based off this.

Any ideas?
Title: Re: Drag and Drop
Post by: Lane on May 28, 2013, 05:46:56 PM
i would use a collider on the food and when it collides with the dog then you know how close it is. You can use that as a trigger.