OfirC
1
So , i have an object which can be moved by mouse dragging.
the object can only move left or right but when it moves too left or too right it passes the wall and the object is invisble…
P.S :With C# and I need it to work on all the resolutions
Vector3point=Camera.main.ScreenToWorldPoint(Input.mousePosition);
point.z = gameObject.transform.position.z;
point.y=gameObject.transform.position.y;
gameObject.transform.position = point;
homer_3
2
SheZii
3
If you want to clamp/restrict gameobjects on the boundary of Minimap, here are the links
Youtube:
Step by step tutorial:
http://techscenarios.com/unity3d-clamp-objects-on-edges-of-minimap-clamp-on-minimap-boundary-free-scripts-part-4/