- Home /
Question by
milospeelman · Apr 24, 2020 at 03:48 PM ·
rotationpositionpivot
how to get the position and rotation of an object in a pivot unity?
im working on a shooter game when i came across this problem: when i spawn a bullet i want to match his transform of that of the gun; but the gun is in a pivot so his rotation is allways 0.
how can i get the rotation compared to the world.
thanks for your awnsers!
Comment
"in a pivot": do you mean that it is a child of a larger object?
gunTransform.rotation is the world rotation, as opposed to gunTransform.localRotation.
Your answer

Follow this Question
Related Questions
Object rotation different from last save? 0 Answers
Rotate plane on a pivot to the mouse position (in 2D) 1 Answer
how to ignore transform.position.y 3 Answers
Position and rotate 3 sprites perpendicular to the edges of a triangle 1 Answer
Rotation of Object on single axis in direction of the mouse position 0 Answers