- Home /
how can i do this, a rotating 3d object on canvas?
hi i want to rotate a 3d object on canvas. canvas is a shopping options where different type of objects are available. object are on scroll view, so they will move accordingly.
also if i use this canvas on different scene and i have have prefab coin on my table the how can i save that stack when i returned to that scene.
thanks
Answer by Abhiroop-Tandon · Apr 01, 2016 at 08:49 AM
The only way i can think of is by changing the transform of the Game Object to Camera.main.ScreenToWorldPoint (new Vector2 (Screen.width/2, Screen.height/2))
so that the game objects comes on a 2D space no matter where the player is looking and then play a rotate animation on the object.
no, i have tried that. problem is i have added cube to canvas but its not visible to camera.![alt ![alt
You need to use sorting layers to put the UI layer back and the cube on a layer in front !!
Answer by aditya · Apr 01, 2016 at 10:21 AM
what you can try is render a camera onto your UI, i mean place your weapon somewhere in your scene and place a camera looking at that weapon and use RenderTexture and use this RenderTexture as the texture for the material of your UI object ...
Your answer
Follow this Question
Related Questions
Swipe to place order in ShopScrollList (prefabs, object pooling, instantiating) 0 Answers
ScrollRect content position is wrong in build 2 Answers
Why are the elements of my scrollview scaled different after refreshing? 0 Answers
How to scroll/drag multiple ui images simultaneously? 0 Answers
UI Text does not show when instantiated at runtime. 0 Answers