Search Unity

How do I make a door move without a GUI button?

Discussion in 'Getting Started' started by Spounias, Feb 20, 2015.

  1. Spounias

    Spounias

    Joined:
    Jan 26, 2015
    Posts:
    8
    How would i make a Door go up without a GUI button? I wanted to make it so you can press the button on a wall or something like that. Five Nights at Freddy's is a good example of what im going for, but in unity. So could i like bind a command to a cube and when you click the cube the door closes/opens. Also when in use can i make it a diff color so you know its in use?
     
  2. Spounias

    Spounias

    Joined:
    Jan 26, 2015
    Posts:
    8
    Aslo Can i make it go up and down instead of up and up and up?
     
  3. Josh-Naylor

    Josh-Naylor

    Administrator

    Joined:
    Jul 1, 2014
    Posts:
    216
    It's your lucky day, I was demoing something similar the other day to a group of students and I can share the project with you.

    In this project we have world space UI, you click the button and it kicks off the animation to make the platform across the scene fly and join up to the platform you are on. http://gyazo.com/52bb05fc8f6ef6f56d02650d5fd842f1

    zip file here (http://1drv.ms/1FwPhQu)
     
    the_motionblur likes this.
  4. Spounias

    Spounias

    Joined:
    Jan 26, 2015
    Posts:
    8
    ok, im sorry but im REALLY new. Thank you for the solution, but is it posible you can retell me that again but explain what a world space ui is. thanks :p
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    World space UI is a user interface that is located in the world rather than directly in front of the player's camera (also called screen space). In the screenshot below, the "OPEN?" graphic is a button in world space.

    http://docs.unity3d.com/Manual/HOWTO-UIWorldSpace.html

     
    Last edited: Mar 27, 2015
  6. Spounias

    Spounias

    Joined:
    Jan 26, 2015
    Posts:
    8
    oooo, thx, i learn as i go. But ive been told b4 i go into that stuff keep making pong games and then a space invador, pong gamex2 space invador x2 pac man x3 and then dive into that stuffz
     
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,203
    Simple games are recommended because they allow you to focus on learning Unity without having to worry about anything particularly complex. I generally recommend creating Pong, then upgrading it into Breakout, and finally into Arkanoid.

    Each game is only slightly more complex than the previous with Breakout adding breakable blocks and Arkanoid adding simple enemies and power-ups.

    http://en.wikipedia.org/wiki/Breakout_(video_game)
    http://en.wikipedia.org/wiki/Arkanoid
     
    Last edited: Mar 29, 2015
  8. Spounias

    Spounias

    Joined:
    Jan 26, 2015
    Posts:
    8
    idk the last 2 games but ill google it