Hi there,
When placing a new GameObject on the Terrain (during runtime), I only want the user to be able to place the GameObject when there is no other Object of this type. The Objects might be placed right beside each other, but they shall not overlap.
I wonder whether I should really use Physics (colliders) for this. Is there no quicker and better-performing solution for this?
RayCast or something?
1 Answer
1
PhysX is staggeringly, amazingly fast.
So yes: you can place an invisible version there, first, to see what you hit.
This is normal procedure.
And for sure, you can also use raycasts if that works for you. Try both as it’s a line or two of code to try.
Performance questions are incredibly out of date, wrong. To draw ANYTHING on the scene, to do anything, the modern 3D hardware-softwrae pipeline is performing a staggering amount of calculations every second.
Simply open your profiler and have a look.