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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -