I have 3rd person game, which has character who picks up object with left mouse button and drops it when I click object again. This works fine.
I am using parenting to do this. My problem is, when I pick up object, it won’t be in front of the character.
I have tried
player.transform.position.z + 1f;
and
player.transform.parent.position.forward + 1f;
z one works, kinda. When character is facing “north” it will place object frotn of him, but if he faces any other direction it will be on his side/back.
parent.position.forward doesn’t do anything and just position.forward places it near world 0.0.0.
How do I detect which way my character is facing and then place object in front of him when I pick it up?