Quantcast
Channel: Answers by "d2"
Browsing latest articles
Browse All 26 View Live
↧

Answer by d2

In my case that was happening because i had the project in a folder named: Shelter/Blue, the problme was the "/", when i changed it, the problem was solved

View Article


Answer by d2

You can try to write a simple HitDetection script to each part of the ship, e.g. LeftWing, RightWing, Shield, etc. and assign an id to each part, then OnCollisionEnter send this id to your MainShip...

View Article


Answer by d2

The isTrigger has to be unchecked.

View Article

Answer by d2

Try this: void Start(){ if( PlayerPrefs.HasKey("High Score") ){ highScore = PlayerPrefs.GetInt("High Score"); }else{ PlayerPrefs.SetInt("High Score",0); } }

View Article

Answer by d2

I dont know JavaScript but in c#, you can try this: using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Linq; public class Example : MonoBehaviour { public List...

View Article


Answer by d2

try this: rb.AddForce(new Vector3(transform.forward.x, 0 , transform.forward.z) * 5000);

View Article

Answer by d2

put the GameObject.FindGameObjectsWithTag("Clone"); before the Spawn() call, and add a validation: if(enemyPrefabs.lenght > 0) Spawn();

View Article

Answer by d2

Maybe you can use Generics: https://unity3d.com/es/learn/tutorials/modules/intermediate/scripting/generics

View Article


Answer by d2

use: Vector3.Distance(transform.position, tower.transform.position)

View Article


Answer by d2

PE.Emit(amountOfParticles);

View Article

Answer by d2

instead of Input.GetButton("Jump") use Input.GetKeyDown("Jump") or Input.GetKeyUp("Jump")

View Article

Answer by d2

ADD a ui button to your scene . GameObject -> UI -> Button, and make a script: using UnityEngine; using System.Collections; public class Loader : MonoBehaviour { public void Play(){...

View Article

Answer by d2

you could change move with MoveToowards instead of translate, something like this: transform.position = Vector3.MoveTowards(transform.position, _target, speed * Time.deltaTime);

View Article

Browsing latest articles
Browse All 26 View Live