playMaker

Author Topic: Problem dragging and dropping HUD screen  (Read 145 times)

xtr33me

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Problem dragging and dropping HUD screen
« on: April 09, 2019, 07:06:31 AM »
I've been having issues trying to get this working correctly and so I thought I'd post here in parallel to see if anyone has any ideas as to what I am doing wrong. Perhaps I am approaching this incorrectly.
**** EDIT:
With the setup below, if I have the "Space" as "self", and mouse positions normalized, the sprite moves on the screen but only a tiny fraction (which makes sense) and of course I was wanting it to follow the mouse pointer or finger touch exactly.  If I don't normalize the mouse then the movements are larger, but the sprite seems to have an offset and tends to be out of my viewing area, rather then where my mouse or finger touch is, but it does seem to move in relation to it. If I set the "Space" to "world" and used "ScreenToWorldPoint", the DoozyUI screen flies to the player camera's Z which is not what I was wanting either. So I believe I need to keep it in world space and jsut figure out how to have the DoozyUI screen with my sprite, follow the mouse
****
Currently I am working on a training world where I need to allow the user to select an object in 3D to bring it into view, then select a scanner button which I am currently showing a UI overlay using DoozyUI which is a 2D sprite of a hand scanner, and allow the user to drag this sprite around on the screen where I will later need to detect if they scanned the proper barcode.

The 3D object manipulation I already have working. I am ironically having issues getting the 2D sprite UI element moving on screen. I was trying to use PlayMaker to perform the action instead of code just to try to get more familiar with it.

I have provided some screenshots below of my current setup. I'm just showing the mouse touch below to reduce the number of images, as I believe if I get one I can easily implement the other once I figure out what I'm doing wrong. 

Should anyone have any ideas or recommendations, I would love to hear them.  Thanks in advance!



« Last Edit: April 09, 2019, 07:30:45 AM by xtr33me »

xtr33me

  • Playmaker Newbie
  • *
  • Posts: 9
    • View Profile
Re: Problem dragging and dropping HUD screen
« Reply #1 on: April 09, 2019, 10:35:52 AM »
So what seems to be happening here is that in DoozyUI it is always referencing the masterCanvas for positional coords, as when I go to the lower left of the screen with my mouse the sprite is perfectly center. So I think I just need to account for this in my logic and I should be all good.  Again if anyone has any better ideas, throw em on over, but I believe this is resolved.