Z
Z
Zimaell2020-07-30 11:49:08
Unity
Zimaell, 2020-07-30 11:49:08

How to find out the size of the occupied area of ​​an object?

Let's say I have a tree object that occupies an area of ​​1x1, but there is also an object that occupies an area of ​​2x5, for example, how do I know that it occupies such an area?

The objects themselves consist of an empty object (containing only a transform) and it already includes its components.
Let's say I need to build a tree or a house on the stage, I need to know their size in order to calculate by size whether the given object falls into the free area.

I thought at first to set the scale for the main object, but then it affects all the components.

Tell me how to do it right? (For example, building objects in strategies so that they do not climb on top of each other...)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergei Iamskoi, 2020-07-30
@Zimaell

Recently there was a video on YouTube on this topic: https://www.youtube.com/watch?v=QmJRq1GTL4g
The size is set in the property of the object, and when it is placed on the stage, it is checked whether it enters other objects or not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question