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

Unblock Game Controls

Discussion in 'Scripting' started by Jesse_Pixelsmith, Apr 22, 2013.

  1. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    Looking to mockup a simple unblock game, and wondering what the best way to do the controls would be.

    I saw a a couple "click and drag" scripts with rigidbodies on the unifywiki, but I don't want one block to affect other blocks physically, just be constrained as to where it can move.

    There are so many clones of this game out there, but haven't seen any made in Unity (that I know of). Here's a link to one of the more popular ones:

    https://play.google.com/store/apps/details?id=com.kiragames.unblockmefree&hl=en

    Any advice is appreciated!

    -Jesse
     
  2. AlteredReality

    AlteredReality

    Joined:
    Aug 15, 2011
    Posts:
    397
    Last edited: Apr 23, 2013
  3. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    I actually got this to work quite well by just creating a rigidbody on the object that was clicked, and taking it off when the mouse is up
     
  4. Jatin_J3

    Jatin_J3

    Joined:
    Oct 31, 2014
    Posts:
    9
    Hi JesseAlexander,

    Can you please help me with that..
    I get stuck with strange behaviour of the Movement....I am Using 2d raycast for the same..Thanks
     
  5. wuname

    wuname

    Joined:
    Jan 6, 2016
    Posts:
    1
    Last edited: Jan 18, 2016