Quantcast
Channel: Answers by "redeemer"
Browsing latest articles
Browse All 49 View Live

Answer by redeemer

Hi, We've just released this fov plugin you might be interested in. It comes with various examples, one of those is an AI that follows the player when detected and returs to the start position when the...

View Article



Answer by redeemer

I don't know if the Photon Hashtable warks as a regular one, but if that's the case, you don't have to add the ID and then the item, you add both at a time. I'd change this two lines _itemInfo.Add...

View Article

Answer by redeemer

I'd suggest to use raycast to detect the exact point where the tpuch and the terrain collides. Something like should work : Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit[]...

View Article

Answer by redeemer

Acording to your code, you're not actually raycasting anything, but only declaring the variables to do so. Try this : function Update () { var rayLength = 10; var hit : RaycastHit; var fwd =...

View Article

Answer by redeemer

You need your script to extend MonoBehaviour to add it to an object in the scene. You can't do it if your script does not extend Monobehaviour or if it extends Editor. If your excript extends Editor...

View Article


Answer by redeemer

You can create a Tag for those buttons ("ButtonTag"), and in the Start method you can Find them by doing : GameObject[] buttonsList = (GameObject) GameObject.FindGameObjectsWithTag("ButtonTag"); then...

View Article

Answer by redeemer

I think a quick workaround would be something like this using UnityEngine; using System.Collections; public class ScreenTest : MonoBehaviour { Resolution res; // Use this for initialization void Start...

View Article

Answer by redeemer

Correct me if I'm wrong, but what I've understand from your question is you want to know how to tell if you are hitting a sand block or a wood block. If that's the case, I'd suggest to create a Tag for...

View Article


Answer by redeemer

Select in the create panel in the Hierarchy: Create -> UI -> Button. This will create a new button. Select the button in the Hierarchy and in the Inspector you can see an Image component. In the...

View Article


Answer by redeemer

Why not use the transform own LookAt?? instead of making your own lookAtPlayer, substitute the call to that function for : transform.LookAt(player.transform.position); This should do the trick. ;)

View Article

Answer by redeemer

This should do the trick I think : #pragma strict import System.IO; var numbercurrentobj; var newnumber1; var path : String = "\\Resources\\currentobj\\"; var currentobj : String; function Start () {...

View Article

Answer by redeemer

It looks like your're not calling your LimitSpeed() method anywhere. Call it in the Update method : void Update() { LimitSpeed(); }

View Article

Answer by redeemer

It should fire both of them. I've made a simple example scene, you can get it here : https://mega.co.nz/#!H8ElFBzT!d1JpixXbBajL_IM95Mu-IVk_RXsDs_SHZulOOUUONWE Just import it in an empty project and hit...

View Article


Answer by redeemer

Ok, this is a first wuick approach, but you maybe want to start with something like this : using UnityEngine; using System.Collections; public class GravityField : MonoBehaviour { public Collider[]...

View Article

Answer by redeemer

Try adding an equal in the evaluation if, like this. This way, when current speeds hits 0 the damping would be 0 : void FixedUpdate () { if (CarTouchControls.reverseOn == true ||...

View Article


Answer by redeemer

Maybe this ould help you. Why don't you try to mantain an object with the script where the info is? You can do this just by using DontDestroyOnLoad() method. Just add to the Start or Awake method :...

View Article

Answer by redeemer

Hi, For what I know, if you don't use OnTriggerEnter/OnTriggerStay/OnTriggerExit mathods, they won't be called. In terms of performance it would be better to have just one trigger instead of four. None...

View Article


Answer by redeemer

Hello Aidan, I don't know if you plan to make a Navigation system on your own, or you just don't know about the unity's own Navigation feature. In case you don't know about it, sure you'd be interested...

View Article

Answer by redeemer

Just saying as a possible cause, if you have a memory leak and your game uses too much memory, a mobile device, usually would close the program, it just happend to me a while ago. Not having access to...

View Article

Answer by redeemer

My first recommendation would be for you to change to Mecanim animation if possible. But if you intend to use Legacy I think this would help you : http://docs.unity3d.com/Manual/AnimationScripting.html...

View Article

Answer by redeemer

Hi, If you don't have any other coroutines you need to keep active, you could try with StopAllCoroutines. http://docs.unity3d.com/ScriptReference/MonoBehaviour.StopAllCoroutines.html

View Article


Answer by redeemer

Hi Dakinegabe, In my opinion you should use the new UI system if possible. I've done a really simple scene with what I think is you are trying to acomplish (the count down 3, 2, 1 is in red, Go! in...

View Article


Answer by redeemer

If you only need to restore the positions at the last checkpoint, you could try the next approach : - Declare a variable in your enemy's script such as "lastCheckpointPos", you will update this var...

View Article

Answer by redeemer

Hi Firedan, I think the best way to accomplish that would be to make an animation for the circle. The quality of the sprite will determine the definition when it is big and you would need to have only...

View Article

Answer by redeemer

A little late I know, but I've just run into this same problem, and maybe someone else finds this helpful. I can only guess why it's not working with variables, sorry, I supose they don´t want the...

View Article

Browsing latest articles
Browse All 49 View Live




Latest Images