playMaker

Author Topic: How to move game objects to specific UI element in the HUD?  (Read 1341 times)

Neikke

  • Full Member
  • ***
  • Posts: 134
Hi,

In my game Player collects Coins (3D gameObjects) and Scores (TextMesh Pro text). So in order to better visualize for players what goes where, I would like to make Score Values and Coins  to be Moved towards corresponding places in the game's HUD. How should I approach this kind of task?

Will "Move Towards" action with corresponding UI element in "Target Object" field solve it? Thanks in advance!
« Last Edit: July 09, 2019, 11:11:56 AM by Neikke »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: How to move game objects to specific UI element in the HUD?
« Reply #1 on: July 09, 2019, 11:30:27 AM »
Hi.
in Many cases it is actually an ui object that gets enabled and set to the 3d object position, and the 3d object gets disabled. (ui to world Position)

Then tween towards coins meter.

Move Towards will not work with ui

Neikke

  • Full Member
  • ***
  • Posts: 134
Re: How to move game objects to specific UI element in the HUD?
« Reply #2 on: July 09, 2019, 12:32:24 PM »
Thanks for reply! Did I understand you correctly that I basically just need to move one UI element towards another UI element? Or you mean moving Coin UI element towards some empty 3D object placed where my Coin Meters in UI is?

Also, my 3D Character is in World Space, and I need to move a Coin towards object in UI space (I guess it's called Screen space) how do I spawn that UI coin directly where my 3D Character is and move it to UI element?
« Last Edit: July 09, 2019, 12:34:45 PM by Neikke »