Quantcast
Channel: Answers by "Althaen"
Browsing latest articles
Browse All 33 View Live

Answer by Althaen

First you need to connect an object to the script. In this example case a Rigidbody object. So save this in a variable. //Drag the prefab with a rigidbody to the prefab& slot in the inspector var...

View Article



Answer by Althaen

This may help you. If not them I'm not much use. :) http://docs.unity3d.com/Documentation/ScriptReference/Object.Destroy.html

View Article

Answer by Althaen

Have you tried to change the "Import Type" setting in your first image?

View Article

Answer by Althaen

I found out why it stops at 1... The code: z = (z % 3) +1; It only works 3 times. If I set it to 5 it works 5 times. If I set it to 57 it works 57 times. How do I make it go between 1-3 forever?

View Article

Answer by Althaen

I think this should work. static var maxSpeed = 0; private var lightOn = false; Update () { if (Input.GetKeyDown(KeyCode.Q)){ if(lightOn==false){ lightOn = true; maxSpeed = 1; } else{ lightOff = false...

View Article


Answer by Althaen

It's rather complex... No one is going to be able write this for you on answers. You'll have to have a lot of experience before you can attempt something like this. I'm unaware of any scripts that do...

View Article

Answer by Althaen

Your problem is quite simple. But it's the simple things that get you. I fixed your problem. You had a colon in a place you're supposed to place an equals sign and you don't need that second Rigidbody...

View Article

Answer by Althaen

One issue I see is that you've put your shooting code into a Start function. I haven't tested this code so if it doesn't work just tell me. Try this: function burstFire() { for(var i = 0; i

View Article


Answer by Althaen

Place the cubes then select a cube and attach a collider to it click Component > Physics > Mesh collider, do this for each cube. I'm guessing the cubes aren't moving?

View Article


Answer by Althaen

These are console errors and they're telling you that some of your code is broken. Were you messing about with the example game? Check your scripts.

View Article

Answer by Althaen

I think you're not checking for the mouse button to be pressed so it never works. I put your onmouseenter functions into if statements in Update. I think that will work. void Update () {...

View Article

Answer by Althaen

Try using print ("TEST"); Does the same thing.

View Article

Answer by Althaen

Just decided to rotate the player with the camera attached to it. Works fine so far.

View Article


Answer by Althaen

File > Open project > Open other > find the folder with the name of your project and highlight it > Select folder

View Article

Answer by Althaen

All I did was make clicking on the terrain in the InputManager use SendMessage to send the lasthit recorded from the NGUI raycast to movePlayer() in the MovementManager by using UICamera.lastHit.point...

View Article


Answer by Althaen

Take the cast vector from the raycast and instantiate your test prefab at that point. Try something like this: public GameObject cubeClone; void SomeFunction(){ Instantiate(cubeClone, cast,...

View Article
Browsing latest articles
Browse All 33 View Live




Latest Images