How do I get my character to collide with other objects while moving to a position?
All I've managed to do is change the position, it only collides if the character is not moving, it's like he is moving behind.
void Update () {
foreach(Touch touch in Input.touches)
{
if (touch.phase == TouchPhase.Began)
{
worldCoordinates = Camera.main.ScreenToWorldPoint(touch.position);
posi.x = worldCoordinates.x;
posi.y = worldCoordinates.y;
//transform.position = Vector3.MoveTowards(transform.position, posi, speed);
//transform.Translate(0,32.4,0);
//rb.MovePosition(posi);
}
}
}