Spawning an object betwheen two positions (while making sure whole object is within area)
Hi, i was thinking of being able to move around certain objects within two given positions. And while i am more than familiar how to do this usually, what i don't know is how to do this making sure that the whole object no matter the size is contained within that area (no part of the mesh should be able to go outside said area).
.....................................
The only way I thought could work is that rather that having the origo in the center of the object i could put it at one of its sides and adjust the two position to match for the moving of that side. However since i intend on doing this on way more objects in the future. I would prefer if there was an alternative for this method.
....................................
any help is appriciated, thanks
Answer by tormentoarmagedoom · May 25, 2018 at 10:37 PM
Whats the form of the atea? Talk correctly if need helo. An area between 2 points? Thats a line. So crate 2 colliders at the both ends of the lime, to detect if the object is colliding.
Same for non circular area.
Bye