Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ... on July 24, 2023, 04:26:46 AM

Title: Drag and drop object with exact position in 2D
Post by: ... on July 24, 2023, 04:26:46 AM
Hi all,

i'm having issues making a drag and drop system in 2D with perfect position. As you can see in the gif below, the object does not follow the cursor properly, i.e. cursor moves faster than the object i am dragging.

https://gifyu.com/image/ScS8B

Here's the setup for dragging:

(https://i.ibb.co/sWk5CV2/Setup.png)

Offset is used so i the object is not centered to the cursor every time i click on it. Instead, i use the offset so the object is dragged from the point i click ok. It is not causing the issue since the issue is present without the offset too.

Edit: Sorry, a small error in the screenshot, set position is using ScreenX and ScreenY calculater from the screen to world point.
Title: Re: Drag and drop object with exact position in 2D
Post by: ... on July 24, 2023, 04:59:47 AM
Ok, i was overly complicating it, basically converting the mouse x and y from screen to world gets it working properly, i just have the issue of the picked object "jumping" to cursos. Any ideas on that one?