- Home /
Question by
baltrek · Nov 22, 2018 at 07:43 AM ·
rigidbodyinstantiatetransformvelocity
Rigidbody.velocity works diffrent on cloned object
Those three lines definnes how my item moves when i pick it. It becomes my child and always keep pos.x, y and z constant depending on parent. But when i clone one object like this:
Rigidbody Copycube = Instantiate(cube, PickGuide.transform.position, Quaternion.identity);
and pick it, It does not works the same. It becomes child my child but does not keep same the same position( relative to me) then i walk
item.velocity = Vector3.zero;
item.angularVelocity = Vector3.zero;
item.transform.SetParent(PickGuide.transform);
Then i changed to
item.velocity = Vector3.zero;
to
item.transform.position = SpawnPoint.transform.position;
then picked object teleports on my face but it works with cloned objects. Then what is wrong with rb.velocity or cloned object?
Comment