Smooth Camera 2D Follow Player
Hi, Vector3 point = camera.WorldToViewportPoint(target.position + new Vector3(0,4,0)); Vector3 delta = target.position + new Vector3(0,4,0) - camera.ViewportToWorldPoint(new Vector3(0.5f, 0.5f,...
View ArticleMoving while facing the camera
Hello there, I'm just learning the basics and I've found myself in a hard situations that I can't get out, I was trying to make a character move to the both vertical and horizontal, but yet moving the...
View ArticleSmooth Camera 2D
Hi, I had some problem with this script. When the speed of the Player is higher than the camera's speed, then there is a bad effect. Is like the camera tremble up and down at high speed. How can i...
View ArticleColliders overlap with follow script
All of my enemies, or anything that seeks and follows something else, uses the same follow system, and so considering how they all take the same path, they occupy the same space, even though they have...
View ArticleMain Camera child under player, causes flip
I am building a 2d platformer, and I have my movement script complete; however I wanted the main camera to follow my character throughout the level, so I thought the best way to do this would be to...
View Articlehow to add a speed limit?
foreach (Touch input in Input.touches) { if (input.phase == TouchPhase.Moved) { Vector3 screenPoint = new Vector3 (Input.mousePosition.x, 65); screenPoint.z = 11; //distance of the plane from the...
View ArticleMissiles Overlap
I have two missile creators, but as they all have the same trajectory, they end up looking like one because they don't collide. i have a follow script here. I was wondering what i should do (& how)...
View ArticleCamera following/looking at aircraft
I have the following code so the camera follows the aircraft. Camera.main.transform.position = Vector3.Lerp(Camera.main.transform.position, transform.position - transform.forward * 10f + transform.up *...
View ArticleMouse Orbit script following other object
Hi, i am using Mouse Orbit script, but its rotation doesn't follow its parent rotation. I have this script attached to my camera which is child of character, but when i rotate character camera doesn't...
View ArticleInstantiate a prefab and follow player position in runtime?
Hello UnityCommunity!, It's possible to instantiate a prefab in player position and follow his movements? I'm actually instantiating a prefab in player position with transform variables but I don't...
View ArticleNPC starts shaking when switching from Follow AI to Wander AI
I'm working on a project where animals will wander randomly usually, but if they like the player enough, they will follow him when nearby. Currently, it's just a boolean I can switch in the inspector,...
View ArticleCreate two objects that rotate together when locked
I've been looking and looking trying to find this. What I want is to have two rigidbody objects so that when one is rotated, the other rotates in all 3 dimensions in the same direction - when they are...
View Article[SOLVED] Particle system follows root bone of actual parent bone.
Hello there, I'm facing a problem and I really won't know where the issue is. I have two skinned characters, Mech3 and Mech4. They are different models but they have the same rigging structure (same...
View ArticleWorld position question
I want the camera to sit in front of my head bone, and I can't attach it to the head bone because I only want the position of the head bone, not the rotation. I have tried this: function LateUpdate() {...
View ArticleCamera 2d following player with delay jumps
Hey, I was looking for answer for two days. Could not find it, or it just did not work as expected. I need in my 2D game (X,Y) a camera that follow player. But the thing I need is that camera has some...
View ArticleFollow Player 2d
I got this script from another wonderful user on this forum and it works perfectly for what it was designed to do... there are some problems though.... Is there any way this script can be made to work...
View ArticleHow to get camera to follow player 2d
Hi I just made a 2d endless runner and this is the code i used to get the camera to follow the player (its in C#) using UnityEngine; using System.Collections; public class CameraRunnerScript :...
View ArticleCamera not rotate when following player
Hello I am making a 2D game but I need the camera to follow the player (which Is a sprite) without rotating. For example my code for the player includes a rotation for the player to face the other side...
View ArticleHow to Follow By Getting KeyDown?
Hello Unity3D.I have a question about how to following?How i can make it that whenever i Get a key down i can follow a object and after a certain amount of time the player stops following that...
View Article2D Camera Follow - Jittery?
Hi guys! I'm having a small problem with my camera follow script. Every few seconds the camera jitters on the x axis, but I'm not sure why. Here is my script so far: public float addPos; public...
View Article