- Home /
Unity New Ui WorldSpace Button Make it appear same size
Hello how can i make use of the new Unity Ui to create a worldspace button that follows an object and it appears the same size regardless of the distance of the object to the camera? I made canvas,set the render mode to WorldSpace and added a button to it, attached the canvas to my object. It does follow it around but the size increases accordingly when i move my object towards the camera
Any ideas would be greatly appreciated. Thank you
Answer by _MGB_ · Feb 03, 2015 at 10:52 AM
Make your canvas Screen Space, and in LateUpdate move your button with: Camera.main.WorldToScreenPoint(trackedObj.transform.position)
Your answer
Follow this Question
Related Questions
Screen Sizes - HUD - Button Layout - Camera. 0 Answers
(C#) How to scale buttons and GUI Text to screen 1 Answer
Unity 4.6 New UI Button OnHoldPressed 0 Answers
Converting Rect transform to World Position of 2D game 1 Answer
Can't interact with buttons in a UI Canvas in World Space Render Mode. 0 Answers