Resizing a 3D Plane at runtime.
Hello.
I'm working on a project that requires me to be able to resize a 3D plane at runtime. My set up is as follows;
I have a 3D plane (called Zone) with an origin (pivot) point at the top left. (it was made in 3D Studio that way).
In the editor, scaling the option on the X/Z resizes the zone correctly in only one direction.
I can currently drag and drop and change the Zone's position in 3D space (along the XZ only).
The Zone GameObject has a child called Resizer, which sits in the bottom right.
As it's a child, the Resizer correctly moves in relation to the position of its parent Zone.
I can also click and drag and drop that Resizer to any position on the world.
If it matters, the camera is fixed, top down, Isometric view.
I would prefer to keep this setup as a Parent/Child as it's just easier to manage when I instantiate many of these zones in the same scene (I want the resizer to come with the zone).
The goal is to have the Zone resize itself (width and height) according to the position of the resizer. As I move the resizer, the zone should change size. However I've tried every permintation of local scale, transform position, bounds, size, etc... I can think of and I havent found the solution.
How do I set the Right/Bottom of the zone, to match the Right/Bottom of the resizer widget?
Picture below if it helps.
Thanks in advance. David
Your answer
Follow this Question
Related Questions
Player position relative to rotating platform [gif included] 0 Answers
Saving default scale of an object c# 1 Answer
Player Prefab scale automatically goes to 1 x 1 x 1 whereas I have set it to 0.48 x 0.48 x 0.48 1 Answer
Content Size Fitter should scale only in one direction 0 Answers
How to make gameobjects exact sizes regardless of image size,Game Object uses full width of screen 0 Answers