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

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -