- Home /
Question by
whisker-ship · May 31, 2016 at 02:57 AM ·
childsizeworldspacelocalpositionpostion
How to get the world position of the edge of an object?
untitled.png
(141.7 kB)
Comment
Best Answer
Answer by JoshDangIt · May 31, 2016 at 03:12 AM
Assuming that gameobject's parent isn't scaled, you should be able to do something like this (Untested):
Vector3 offset = transform.up * (transform.localScale.y / 2f) * -1f;
Vector3 pos = transform.position + offset; //This is the position
Answer by JedBeryll · May 31, 2016 at 05:02 AM
transform.position + transform.right * -transform.localScale / 2
Your answer
Follow this Question
Related Questions
Lerp a Child but 'keep up locally' with Parent 0 Answers
Object position and its size 0 Answers
Make a simple tree 1 Answer
how can i get objects size according to world coordinate? 1 Answer