Javascript Distance Check Not Working
I'm working on a script which means that if a player presses the 'e' key when close to another player, they will attack. Although I can see in the inspector that the variable 'distance1' is working and...
View ArticleAny Solution? EnemyAI
NullReferenceException: Object reference not set to an instance of an object EnemyAI.Update () (at Assets/Scripts/EnemyAI.js:19) var target : GameObject; var Weapon : GameObject; var lookAtDistance =...
View ArticleTurret Placement in Turret Defense Game
This script is used to place turrets on a grid of tiles. Everything works well until I place one turret. When I place one Turret it doesn't let me place anymore, when I delete the turret while playing...
View ArticleGUI.Textfield backspace wrong behavior
I want to use **TextEditor** object to control cursor position in **GUI.Textfield** like that: TextEditor editor = (TextEditor)GUIUtility.GetStateObject (typeof(TextEditor),...
View ArticleInput.GetTouch isn't giving correct position
Hello , I am Moving my game object left and right within X-Y plane same like 2D shooter game. My gameObject get destroyed when it collides. But collision occures when i write below code: var amttomove...
View ArticleToggle/flicker bool script - Please help
I want to be able to have a script where a bool is false and every 5 seconds it is true for a frame or 0.01 seconds. Example: ![alt text][1] [1]: http://makeagif.com/media/4-02-2013/dpQ7aS.gif
View ArticleHow do I make transform.Lookat use Vector3.down instead of Vector3.forward?
Hey guys, This seems like a situation that should have come up before, but for some reason I am unable to find a simple solution... I have a plane I am using for a wall, I have my bones all weighted...
View ArticleOrthographic camera's child is not showing up in camera preview or game view
I'm trying to make my own GUI-System with an orthographic cam, separate from the perspective cam that displays the rest of the scene. I followed the steps that @equalsequals mentioned in the answer to...
View ArticleFrom footsteps to different footstep sounds (raycasting help)
I have the script for the footstep sound, modified to work with the mobile FPS controller. I am trying to use raycast to detect the floor below player and play different sound for the same. using...
View ArticleFootsteps... Please Help
I am trying to create a js script that plays a random footstep sound when I'm on a particular surface, like gravel or metal, but everything I try doesn't work. I have searched the forums and not found...
View ArticleIssues with WWW resource loading
I am using the WWW class to load audio-clips at runtime as selected by the user. However, I am currently facing two issues. I am posting a code example here to explain. IEnumerator LoadSong(string...
View ArticleIdentify if two vertices are connected
I have a FBX mesh. I then take a list of vertices with Y = 0 out of it (basically all vertices of the mesh that "stand" on the ground. I then need to find if any of the vertices on the list form an...
View ArticlePrevent Y Axis Rotation
I have a script that rotates an object as the cursor moves, it's set to rotate on the X and Z axis. However rotating on both of them at an angle simultaneously and then rotating back at a different...
View Articlelow fps when looking in a direction with many objects
Hello! I have an annoying problem with my Unity game. My Problem: I have many objects in my game (cubes, cylinders). When I'm looking with the 1st Person Controller in a direction with less objects,...
View ArticleI need help with a script(brauche hilfe mit einen Script)
Hello I am a beginner in Unity and scripten. currently I've been trying for many hours on a script. I will make a simple Helicopter Game. The script will effectuate: When for example Level 1 load then...
View ArticlePlayer Health Damage
Hi guys, I have this health script I created for my player, can any one show me how I could integrate damage and death when the player comes close to an enemy? This is the only thing not working in my...
View ArticleCannot control gameobject and play animation simultaneously
Hey there! I've been trying to fix this problem for a little under a week now, and have no idea what i'm doing wrong: I have this turret that you control with the mouse. I want it to play a recoil...
View Articlesequence images Question
In Unity3d plane texture To apply a sequence images, what should I do?
View ArticleAdd 2d Image over Cube
Hello How i can add 2d image over an object in my scene? knowing that i dont rotate the camera and i cant use GUITexture because there is a sliding in all directions in the scene. Thanks in advance
View ArticleHow to implement Rope Physics?
I want to implement Rope Physics without using any Plugins to work like real rope. I'm referring 3d Physics Based Rope at [1]: http://wiki.unity3d.com/index.php/3D_Physics_Based_Rope but above script...
View Article