Moving Object At MousePosition.X
Hello i'm Trying to Make a CrossHair But Not As Texture, i'm Making it as Gameobject but i got problem in making it follow the mouse public GameObject CrossHair; //Start Void CrossHair =...
View ArticleSpace ship UI, multiple pointer that follow individual targets.
i have been searching for days trying to solve this. What I want is to detect all objects with specific tags within triger *check*, and then I want a guiTexture to appear, follow and scale accordingly...
View ArticleMoving a GameObject along a Custom (Curved) Spline
Hi guys, After having extensively searched unityAnswers, the forum, the internet... I can't seem to find the solution to what I'm sure is a very simple problem. I'm trying to make a 3rd person on-rails...
View ArticleHow to Make the SmoothFollow Script Follow Faster?
As it is, the SmoothFollow.js works pretty good. However, I need it to follow my target faster when they are falling. The player gets away from the camera too fast and is too small on the screen. How...
View ArticleHow to make a character follow the cursor?
Hi guys, If I have a spaceship for my space game, How can I get the ship bow (front tip), to look at the mouse and have the camera follow where the mouse goes as well. I know this is leaning up on a...
View ArticleHow do I let a camera follow on one axis?
The camera needs to follow the object on the Z axis, not the X axis. How do I do this? I usually use C#. Thank you
View ArticleHow can I get this script to work?
var distance; var target : Transform; var lookAtDistance = 15.0; var attackRange = 10.0; var moveSpeed = 5.0; var damping = 6.0; private var isItAttacking = false; function Update () { distance =...
View ArticleParticle follow object
hello i am from germany and program a space shooter for android since days. i have a particle system, which shots particles. Question 1: how can a particle change his position. because i want to make,...
View ArticleYet another health bar request
Hello everyone, For the last month I searched and tried to implement a health bar in my game. I had no luck. Even though there are a million tutorials out there, I just didn't found the correct one....
View ArticleFollow script Error NAN?
Error: transform.position assign attempt for 'pan' is not valid. Input position is { NaN, -4.357757, 3.197214 }. UnityEngine.Transform:set_position(Vector3) keyfollower:Update() (at...
View ArticleCamera Follow Player
Is there a way for my Camera to follow my player's Position, and Y rotation? I Dont want the camera to follow his X or Z rotation. Imagine this: The Camera is behind the player, looking at him. The...
View Articleobject ai following, idle animation and pathfinding
**To the moderator dont close this question for asking help or code or anything off topic. i want to see if anyone can help me** hi, i have a player and a floating gameobject(something like a flying...
View ArticleEnemy not rotating when inside range
Hello, I have had this problem for a while but I have not been able to find an answer. When the player gets within a certain distance, the enemy rotates and moves towards the player. When he within a...
View ArticleRigidbody following a spline
Hi, I'm after a suitable idea/way/help and direction of controlling a rigidbody to follow a spline, or set of gameobjects/waypoints. E.g Simple physics cube, being able to control with forces, but it...
View ArticleCamera follow instantiated object and reset
Hello all! I'm currently coming up against what I'm assuming is a noob-ish problem, but i'm an artist primarily so there ya go. I've set up a script on my camera to follow an instantiated object and...
View ArticleItween follow path add gravity to game object following the path?
Hello i have a script that makes my player move and change paths but how can i have him be effected by gravity and still stay on the path? here is my code: using UnityEngine; using System.Collections;...
View ArticleTrouble with getting cube to follow character
Hi all, at the moment I have two scripts (Hills_Cube_Collide.js, Follow.js) The first script sets the target of the cube to 'Player' when the character hits the cube, but only if that cube has the tag...
View ArticleUpdate position of an object to match a high velocity object and still allow...
Hey, hopefully an easy question to answer. I have an object (textItem) that needs to follow another object (planeItem). I can achieve this no problem using the following code in Update(): public static...
View ArticleHow To Make Enemy Shoot At You?
Hello, i want to make enemy shoot at me when it starts to follow me, im not sure but i think i should put the enemy shooting script in enemy AI script. What i am looking for is enemy shooting script,...
View ArticleMake An Instantiated Prefab Child Follow a Mecanim Animation
Hi, what I'm having trouble with is that I have an option that makes the player attach some equipment to the character, but when the prefab is instantiated into the scene, it follows the parent but it...
View Article