E
E
Emil2019-11-05 21:09:28
C++ / C#
Emil, 2019-11-05 21:09:28

How to change the Scale of an object by increasing it only in one direction?

Good evening! How to change the size of, for example, a stick, so that it only grows up, while not falling down as the size increases?
The task is that the stick, which is a child object of a rotating cube, should increase in height. But when changing its Scale y, it breaks through the cube with its bottom. Tell me how to solve this problem?
I tried to compensate transform.position, but the increase and offset is not uniform. Therefore, the stick still breaks away from the cube, and flies away.
I'd like to get an increase in the length of the stick, similar to the Rect Tool , which simply extends the object in one direction.
Masters, please take a minute and help in resolving the issue , thanks in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question