an object set up for drag & drop stops working correctly if screen/camera scrolls
Adventuregoat
Member Posts: 10
Hi,
I have created an object that can be clicked/touched and dragged/dropped around the screen. This works well...
But it all gets wonky if the screen scrolls. Then it's as if the objects center point changes or fails to change. I click it, and it leaps away from the touch point (dragging still works though).
For example: This is a platforming game of sorts, so the camera follows a character. I need to be able to place objects about the level, which can be dragged and dropped once discovered.
I'm guessing I need to modify the basic drag & drop set-up, but I'm not sure about what I need to tweak. Sorry if this has been covered I haven't found it.
Here is how the object is set up: http://sta.sh/0281apmh2jnh
Thank you
Note: The "distance from" rule and constraint are to tell the object it is close enough to the character. If included or removed it has no impact on this problem.
I have created an object that can be clicked/touched and dragged/dropped around the screen. This works well...
But it all gets wonky if the screen scrolls. Then it's as if the objects center point changes or fails to change. I click it, and it leaps away from the touch point (dragging still works though).
For example: This is a platforming game of sorts, so the camera follows a character. I need to be able to place objects about the level, which can be dragged and dropped once discovered.
I'm guessing I need to modify the basic drag & drop set-up, but I'm not sure about what I need to tweak. Sorry if this has been covered I haven't found it.
Here is how the object is set up: http://sta.sh/0281apmh2jnh
Thank you
Note: The "distance from" rule and constraint are to tell the object it is close enough to the character. If included or removed it has no impact on this problem.
Comments
Thanks anatomy!
*EDIT* Yep, works like a dream Thanks again! and thanks to tshirtbooth.