Quantcast
Channel: Questions in topic: "gamobject"
Browsing all 28 articles
Browse latest View live

Destroy gameObject on collision/time?

Hello, I need to add a destroy bullet gameobject script into my shooting script for my FPS game. Currently it laggs and keeps building up. So please reply with the proper destroy gameobject (after 5...

View Article



Problem with game play scene aim, need help

I am making a Ninja duck run game similar Ninja Chicken on steam. but i have been having a little trouble geting all the aims correct.

View Article

Need help moving object to turn around

Im learning Unity, and i want to make an object move, go a certain distance, and turn around. I can handle the turn around part. My main problem is making the object stop after moving a certain...

View Article

how to - trigger that reacts when a gameobject passes through, but the...

so, I got this game in wich airbourne units move from left to right and right to left. A castle defence game. The planes have triggers, so when a hostile unit enters it, it gets shot.I want the units...

View Article

detect objects around player with a predefined distance

hi there friends i have a small problem here is the details: 1-i have a script to look for all objects with tag "Enemy" 2-they will be moving and will be a lot of them (about 100). 3-i want to draw a...

View Article


Creating new GameObject for Procedural Mesh has wrong Transform.position

Hey all, So Ive read that the anchor point of an object's transform cannot be directly changed, but Im looking for a workaround for a project of mine. Basically Im creating a new empty game object...

View Article

How to properly reference a game object

If I attempt to assign a GameObject to a private variable in Start() or Awake() then access that object I get NullReferenceException. But if I make it public and assign it via inspector it works fine....

View Article

Destroy(GameObject) problem

void Update () { RaycastHit hit; Vector3 forward = transform.TransformDirection (transform.up) * 1; Debug.DrawRay (transform.position,transform.up,Color.green); if(Physics.Raycast...

View Article


Is there an asset to show 2D Arrays in inspector?

Is there an asset to show 2D Arrays in inspector? I want to drag and drop gameObjects to it.

View Article


Instantiating objects to create an infinite level.

I have a main object that has a North, West, South and East object as children, ie the name of each object is N,W,S,E. I want the main object to be instantiated and put right in front of me starting...

View Article

StartCoroutine can't be called from a GameObject. Am I late to this party?

I recently realized that I can't call StartCoroutine from a gameObject. Instead, I need a reference to a monobehaviour that is attached to the desired game object. ---------- When was this API changed...

View Article

Destroy gameObject on collision/time?

Hello, I need to add a destroy bullet gameobject script into my shooting script for my FPS game. Currently it laggs and keeps building up. So please reply with the proper destroy gameobject (after 5...

View Article

Problem with game play scene aim, need help

I am making a Ninja duck run game similar Ninja Chicken on steam. but i have been having a little trouble geting all the aims correct.

View Article


Need help moving object to turn around

Im learning Unity, and i want to make an object move, go a certain distance, and turn around. I can handle the turn around part. My main problem is making the object stop after moving a certain...

View Article

how to - trigger that reacts when a gameobject passes through, but the...

so, I got this game in wich airbourne units move from left to right and right to left. A castle defence game. The planes have triggers, so when a hostile unit enters it, it gets shot.I want the units...

View Article


detect objects around player with a predefined distance

hi there friends i have a small problem here is the details: 1-i have a script to look for all objects with tag "Enemy" 2-they will be moving and will be a lot of them (about 100). 3-i want to draw a...

View Article

Creating new GameObject for Procedural Mesh has wrong Transform.position

Hey all, So Ive read that the anchor point of an object's transform cannot be directly changed, but Im looking for a workaround for a project of mine. Basically Im creating a new empty game object...

View Article


How to properly reference a game object

If I attempt to assign a GameObject to a private variable in Start() or Awake() then access that object I get NullReferenceException. But if I make it public and assign it via inspector it works fine....

View Article

Destroy(GameObject) problem

void Update () { RaycastHit hit; Vector3 forward = transform.TransformDirection (transform.up) * 1; Debug.DrawRay (transform.position,transform.up,Color.green); if(Physics.Raycast...

View Article

Instantiating objects to create an infinite level.

I have a main object that has a North, West, South and East object as children, ie the name of each object is N,W,S,E. I want the main object to be instantiated and put right in front of me starting...

View Article
Browsing all 28 articles
Browse latest View live




Latest Images