I ported a pc project to the iPad today and I noticed my script for opening doors wasn't working anymore, this script gets triggered when the player clicks the door game object. I figured I needed to use ray cast for this and yes I can open my door now using this script
however the door only opens if the character is really really close to it, and also it only responds to touches on the touch pads in the bottom corners not when I just tap the door in the center of the screen. I'm guessing the character controller script is conflicting with my script. anyone any suggestions?
p.s. I already posted this on the unity forum but people couldn't really help me there
here it is your answer. its working well... you're confusing much in your coding...you have to attach script into main camera...because check the "ray, you're making ray from main camera". no need of lot variable like string name and lot....
i tested this...and sure it'll work...
answered Dec 08 '11 at 11:28 AM