Answer by brunopava
Hi, I had the same problem once. But looking at the API reference I discovered that angularSpeed receives influence from both speed and acceleration. So I played around and found that if you increase...
View ArticleAnswer by brunopava
There is a cool one here: https://www.assetstore.unity3d.com/en/#!/content/19248
View ArticleAnswer by brunopava
So, in the link below the guy figured it out in an elegant solution that is also re-usable. public static class CoroutineUtilities { public static IEnumerator WaitForRealTime(float delay){ while(true){...
View ArticleAnswer by brunopava
Personaly, I like to make a Singleton and cache some importante variables in it like player, points, list of enemies and etc. The upside is that you make sure that there will be only one instance of...
View ArticleAnswer by brunopava
Also, you need to toggle your boolean to false and true. Like this: public function Toggle() { if(MainMenuON){ // if its active, then deactivate MainMenuON = false; MainMenu.SetActive (false); } else{...
View ArticleAnswer by brunopava
You could use a enum to list the states of your npc. Like: idle, chase, attack Check for the transitions in an Update() function and take the correct action. This aproach is called Finite State Machine...
View ArticleAnswer by brunopava
That is dictated by its radius. If he can fit in the maze it will navigate. Also you need to bake the mesh with the correct radius. ![alt text][1] ![alt text][2] [1]:...
View ArticleAnswer by brunopava
void SeekAndDestroy() { blocks = GameObject.FindGameObjectsWithTag("Buildplace"); if (blocks.Length != 0) { block = blocks [Random.Range (0, blocks.Length)]; rend = block.GetComponent();...
View ArticleAnswer by brunopava
Like this? using UnityEngine; using System.Collections; using System.Collections.Generic; public class VectorIdentificator : MonoBehaviour { //fill this in the editor public List list; private void...
View ArticleAnswer by brunopava
//[Command] void CreatePart() { GameObject Te = (GameObject)Instantiate(TestPart,transform.position,transform.rotation); // You had "TestPart" here. You need to put "Te" because its actualy the object...
View ArticleAnswer by brunopava
You need to use "GetComponent", in doing so you won't need to cast. http://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html mySlider =...
View ArticleAnswer by brunopava
You can use Split. ex: string allCodes = "G10,M8,X5,Y5"; // this splits the string using comma as a parameter. // every index on the array will now have a code in it. // note that this method requires...
View ArticleAnswer by brunopava
You can use this method: http://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html To create a simple timer you can use: float time = 0; private void Update() { time += Time.deltaTime;...
View ArticleAnswer by brunopava
You can check this guy out: https://www.youtube.com/playlist?list=PLW3Zl3wyJwWOpdhYedlD-yCB7WQoHf-My His aproach is very visual and easy to understand. Also you should consider learning a programming...
View ArticleAnswer by brunopava
- Add them to a Panel. - Add a Content Size Filter to the Panel - Adjust the Content Size Filter to resize itself. - Add a Mask to the Panel.
View ArticleAnswer by brunopava
On my opnion you should begin with this aproach: (if you don't want to change scenes) Create an "arena" (where your characters will fight) Position a camera to see this arena how you want. Now the...
View ArticleAnswer by brunopava
I guess you are trying to access a null reference on your list. See, when you call: **ProfileData data= new ProfileData();** You create an instance of ProfileData, but the list itself has no values...
View ArticleAnswer by brunopava
I have a script that can be aplied to this. private float _clampingAngle = 90f; public bool isVisible = false; private Camera _mainCamera; private Transform _itSelf; private Transform _cameraTransform;...
View ArticleAnswer by brunopava
https://www.assetstore.unity3d.com/en/#!/content/2449 https://www.assetstore.unity3d.com/en/#!/content/10032 These two work fine. I have tested them.
View Article