Quantcast
Channel: Answers by "Kleptomaniac"
Browsing all 90 articles
Browse latest View live
↧

Answer by Kleptomaniac

Nobody here is giving you a clear answer. I would set out your script like so: #pragma strict var topdownCam : GameObject; private var cameraFollow: CameraFollow; private var planeSelfMove:...

View Article


Answer by Kleptomaniac

Ah, after reading your question a few more times, I think I've finally got it. The reason that this is happening is because you have *two* cameras, and you are changing the ShakeRotation on the camera...

View Article


Answer by Kleptomaniac

In order to randomly affect the x and y travel direction of your pellets, instead of having `Vector3(0, 0, speed) * Time.deltaTime`, try using [Random.Range][1]. So therefore:...

View Article

Answer by Kleptomaniac

This script is kind of a mess. Here is it cleaned up and optimised: //Got rid of ApplyDamage() here, because it seemed to bear no purpose var maxHealth : int = 100; //Typed these, as dynamic typing...

View Article

Answer by Kleptomaniac

I solved this a while ago by using LateUpdate() ... not sure if it is exactly a legitimate solution but it seems to work fine: function LateUpdate () { if (transform.rotation != Quaternion.Euler(0, 0,...

View Article


Answer by Kleptomaniac

The problem is that when you run you OnCollisionEnter() function, you call `Destroy(this.gameObject)` before you are even able to increment your score. This means it will not work as this script is...

View Article

Answer by Kleptomaniac

Do a tag check. For example: if (collision.gameObject.CompareTag("Target")) { Destroy(collision.gameObject); } This will only destroy objects tagged with the word "Target". Do the targets have a...

View Article

Answer by Kleptomaniac

I would suggest simply implementing a trigger collider for each section of the game in which you want to initiate dialogue. You can do this by simply setting up an empty GameObject with a Box Collider...

View Article


Answer by Kleptomaniac

You should really be using the [Event class][1] for event handling in OnGUI(), due to the fact that the OnGUI() function has multiple passes per frame and will thus repeat Input calls more times than...

View Article


Answer by Kleptomaniac

This means that an object reference had not been assigned to your orbs variable. Have you rechecked it in the Inspector to see that it hasn't lost your reference?

View Article
Browsing all 90 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>