Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Get upward orientation of object and add scale value

$
0
0
Hey community, so i have been trying to tackle this problem which is basicly a how to question. i am trying to move an object to the edge of another object, i almost got it to work except for a 'minor' orientation problem, this is the code snippet: currenthelditem.transform.localPosition.y = Vector3.up + snaptarget.parent.transform.localScale.y * 2; of course the above doesn't work but it shows my intentions :) so basicly my question is how do i use the up orientation of the 'snaptarget' transform and add the localscale value to it. any ideas ?

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>