Hey Guys How to make a script '**private Transform Waypoint;**',
Hey Guys How to make a script '**private Transform Waypoint;**' and I need to create lets say 5 gameObject named Waypoint,1,2....4,5 And those game objects after when reach lets say 'Waypoint1' needs...
View ArticleHow do I keep enemies from overlapping
I am making a fps shooter so far I have 4 enemies when ever they chase the player they over lap. This is the code I am using ` //set the values in the inspector public Transform target; //drag and stop...
View ArticleCinemachine 2d camera problem
I am using 2d cinemachine camera in 2d unity "game" and whenever i try to follow a player with it it keeps moving him in the middle of the scene. How can i fix this?![alt text][1] [1]:...
View ArticleMaking objects follow each other in a line, and objects ignoring minimum...
I'm trying to make a group of objects follow each other in a kind of conga line as they are collected by the player. The idea is that each object will set itself as the last object in the current line...
View ArticleNavmesh agent enemy moving to players last seen position
Dear coders, For some reason, for some reason , using the navmesh agent with the script below, my Agent keeps moving to the last seen position for the player, and not its current position. Im using...
View ArticleHi i need help, how to make the player attack the next enemy with the same...
The problem with this script is after killing its first victim it does not search anymore another enemy with the same tag, i need help for my player to search and destroy the remaining enemies with the...
View ArticleHow to find and destroy gameobject with same tag one by one
Hi, i would like to ask if anybody knows a code that at first will find objects to their transform by using the gameobjectfindtag(), the idea here is to find and destroy the gameobject taged as enemy...
View Articleenemy folow whats wrong with it
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enemy : MonoBehaviour { public float speed; public float stoopingDistance; public float retreatDistance;...
View ArticleHow i make the NPC friend stop following me and start to follow the enemy...
I am developing a game based on Solo Leveling, and my compannion ("shadows") is following me and i cannot find a way to make them start to follow the enemy when he is near. Does anyone knows how to...
View ArticleHow to have child object only follow parent x position
I have a background image that was a child to the camera so that it moves with the camera, but when the camera rotates, i don't want the background to rotate with it. I thought the obvious solution was...
View ArticleCamera Follow with SmoothDamp one axis jitter
Hello everyone! This is my first time building a game from scratch and I have a few questions. The game I'm working on is a rail shooter and the issue is related to the CameraFollow script. My problem:...
View ArticleHow do i get a camera to follow a Bird/Plane smoothly?
Hey There! Im looking for a script or a way to smooth out the rotation between the current camera and a Object to follow (A bird in my case). I tried placing the camera with the target forward, camera...
View ArticleVector3 MoveTowards character flying up when told to follow,Vector3...
I have my "enemy" following another "enemy", yet instead of following, it flies up in the air right off the bat and moves on all the axis. public class BASICMOVEMENT : MonoBehaviour { Vector3...
View ArticleI changed my monitor resolution and now my enemies are chasing me too fast ??
Hello everyone! I have developed a game in which there are enemies that run towards you to kill you. The enemy control system is managed by 3 different scripts: one that deals with managing what the...
View ArticleShow object location with arrow
Hi all, I am making a 3d game, and I want to have a arrow over the player or on my canvas that will point to the location that the player is supposed to go, ex. to an npc. How would I do this?
View ArticleSet navmesh destination if to object that is in range
Hello, I have am npc that follows the player. What I want to have happen is when an enemy enters the trigger (that is surrounding the npc) I want the npc to go after that specific enemy. I have many...
View ArticleHow to spawn an object on button click and make it follow the mouse until...
The game I am working on is 2D, so all sprites are 2D. I have several UI buttons that when clicked on, will set a certain sprite (It will not spawn in to the game), and then I can click anywhere else...
View ArticleIs there a way of making the camera rotate with the sphere like that on the Y...
![alt text][1] [1]: /storage/temp/179955-edwewdqw.jpeg
View ArticleHelp get the enemy to follow the player in the shortest way
I have a code that builds a list that finds the shortest way for the enemy to reach the player. The list is made up of points that are on the map But it does not work it seems to me it is because of...
View ArticleHow to make an object fixed on the screen?
What's up devs! Hope you all doing well! I'm developing a HoloLens application on Unity and I'm stuck on how to fix a GameObject on the screen. I'm trying to create a menu and fix it on the middle left...
View Article