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

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -