- Home /
Translating position of 2D image to 3D world
I'm trying to allow the player to interact with a 2D UI consisting of 2 UI Images, a "board" and a representation of the actual "player". Think 2D chess, with the user allowed to drag a piece freely around the board. But I want this dragging movement to then correspond to moving the actual piece in the 3D game world. How can I translate the position of the object on the 2D image to a position on the 3D board?
Answer by bpaynom · Jan 31, 2019 at 04:06 PM
Just do a Cross-Multiplication using the relative position of the 2D image in limits of the 2D "map", and translate it to your 3D map.
Your answer
Follow this Question
Related Questions
Scripting help 1 Answer
how can I disapear a button after push? 1 Answer
Running a script without being attached to an object? 2 Answers
Animation State Machine Script Control Issue 1 Answer
How to minimize an input value? 0 Answers