c# - Cannot set the position of a game object after detaching it from parent -
i want player able drop gun , pick new 1 can seem reposition gun. current gun child of player , position set relative player when use
transform.parent = null;
it sets position of gun in world space , can change position creating new vector fr position.
when player drops gun, want set position player , detach player , guess can use rigidbody apply physics , drop on floor.
Comments
Post a Comment