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 -
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
Post a Comment