Question by
Soloman23 · Feb 22, 2016 at 09:48 AM ·
vector3positioninglocalposition
Having issues with offsetting an object
I'm basically doing a raycast to the forward of my character, and positioning the player to the raycast hit point but i want to add a local offset to the player. Obviously just doing transform.localPostion += offset
won't work because its and object that has no parent, so local position is just the same as transform.position
... So I'm stuck can anyone help?
Comment
i don't know if this work with you i had a similar problem but i didn't used raycast i used simpler way click here
Best Answer
Answer by Soloman23 · Mar 01, 2016 at 02:58 PM
Solved this by multiplying transform.right, transform.forward, and transform.up by my offset x, y, and z.