unity3d - Cube moving through rigidbody -


in unity 5.1.1f1 have cube moving script. whenever rigidbody comes in contact it, moves rigidbody out of path.

however in of situations, rigidbody in path of cube , cube moves through rigidbody.

for example here in pic, red movable cube , grey rigidbody - enter image description here

as can see red cube can move grey rigidbody.

the sources here

i asked question here

the cube moving script -

 transform.position = vector3.movetowards (transform.position,   patrolpoints [currentpoint].position, movespeed * time.deltatime); 

this issue occurs because rigidbody (blue cube) becomes asleep. can fixed adding getcomponent ().sleepthreshold = -1; start() method of playermovement.cs.


Comments

Popular posts from this blog

c - Calling a function within a loop -

How i fill combobox items in Radgridview manually using in vb.net -

vb.net - Unbound DataGridView add row with checkbox error -