Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Move an Stop by collision?

Discussion in 'Physics' started by Schwebo, Apr 12, 2023.

  1. Schwebo

    Schwebo

    Joined:
    Apr 12, 2023
    Posts:
    3
    Hey Folks,

    i completely new in unity, and just playing around :)

    i have two cubs. one cube as a BoxCollider, an stays aorund. the otehr cube can be move by script with the keys, and has a RigidBody...

    But when ich move may cube around an thorug the other cube.. noting happends...

    do i have fetch any events, to block the move script (updat function) in the script!?

    Thanks a lot
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,605
    Just add a BoxCollider to both cubes. If only one of them is able to collide, the other one will pass trough it.