- Home /
Getting X/Y positions of the rotated Vector3
I need to get the position drawn in red on this image: The position is local vector from BOX trigger object. SO far i have managed to get the global position only.
Comment
Answer by VesuvianPrime · Sep 09, 2014 at 12:39 PM
Hey Vossy
It's not entirely clear what you're asking. I think you have the following hierarchy:
"Global direction" Transform
-> "local direction" Transform
And you have a Vector3 from the "local direction" to your unknown X,Y,Z point. Is this correct?
If so, you should be able to do something like this:
Transform localDirection; // Replace this with your child transform
Vector3 direction; // Replace this with your direction
Vector3 targetPoint = localDirection.localToWorldMatrix.MultiplyPoint(direction);
Your answer
![](https://koobas.hobune.stream/wayback/20220613162630im_/https://answers.unity.com/themes/thub/images/avi.jpg)