Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Collisions like a wall

Discussion in 'Community Learning & Teaching' started by angel9of3war, Mar 2, 2014.

  1. angel9of3war

    angel9of3war

    Joined:
    Feb 28, 2014
    Posts:
    12
    Good afternoon.
    I'm trying to start a project and the first thing that I want to do is two cubes (2d or 3d), and on click, the cubes move. When the first cube collides with the second cube for example, I want that detects the collision. It makes that, but when the first cube collide with the second cube, the second cube moves. How can I put the cubes fixed, that only moves with click? In short, when the first cube collide with the second is detected the collision and I can not "pass through" the second cube, like a wall.
    Can anyone help me ?
    Thanks.