Stopping moving object going through a wall

Hi All

Sorry, but this is my 2nd question regarding this problem that I am facing. I have a moving cube that responds to mouse clicks, whenever I click the mouse the cube moves to that point. I have another object (a wall) when I click on the wall my cube moves into the wall (goes through it or part of the cube acually in it) and doesn’t stop at the wall surface. Please I’ve seen some videos regarding applying rigidbdies and colliders to achieve this but with me no luck so far. Any one can state the steps of doing this but please with no code addition as I’ve seen it done without adding any scripts or coding which I prefer.

Thanks in advance and looking to your answers.

All you have to do is set the Collision Detection property in the Rigidbody component to “Continuous”.

82453-ss-2016-11-19-at-012709.png

add a rigidbody and make sure your wall has a solid mesh. You can change the mesh and physics settings from your object too and set the material, so it can bounce, stop, whatever. Make sure that physics collider is on

And remember give a box or mesh collider to your wall
And also to your box

using UnityEngine;
using System.Collections;
using UnityEngine.Audio;

public class Blast : MonoBehaviour
{

public GameObject explosion;
public GameObject playerExplosion;

// private object gameController;
private object playerUnitScript;

void OnTriggerEnter(Collider other)
{
     if (other.tag == "Boundary")
     {
        return;
        //Instantiate(explosion, transform.position, transform.rotation);
    }
    Instantiate(explosion, transform.position, transform.rotation);
    if (other.tag == "Player")
    {
        Instantiate(playerExplosion, other.transform.position, other.transform.rotation);

        // gameController.GameOVer();
    }
    Destroy(other.gameObject);
    Destroy(gameObject);
}

}
its not working can any pls solve this