Now you have two itween events in your door hinge object.
Opening and locking doors c unity3d.
The door problem is that i want to make the door open more with each mouse click on it.
Name the first itween event opendoor and use the following values.
Unity 2d mouse zoom but zoom in to location of mouse point.
I would like to be casting a ray from my player looking for the doors once it finds one it accesses the.
Repeat the process and name the second itween event closedoor and use the following values.
All of your doors open because you re not actually checking whether or not the hit object from your raycast is actually the door object your script is holding a reference to.
Select your door hinge in the hierarchy folder and add two itween events to it.
After i click 5 times it should move back in the opposite direction till it is closed.
Below is a simple script to make an openable door in unity 3d without using animations.
Open a door front and back in unity3d similar to amnesia.
Imtiaj touches on this briefly but string compares on game objects are a bad idea and does not limit yourself to one object as many game objects an have the same name.
I use unity 5 3 currently but it will work in.
Projectile speed relative to.
I was wondering if somebody could explain door opening closing code to me please.