Quantcast
Channel: Answers by "TobiasP"
Browsing all 72 articles
Browse latest View live
↧

Answer by TobiasP

First, the variable/method must be **public** To get the a variable or call a method from the parent: Script parentScript = this.transform.parent.GetComponent

View Article


Answer by TobiasP

Ok, So I hope you don't get mad, but I changed and added a few things. The way you were doing it wasn't going to work because it will turn off both player's movement controls and other issues. I made...

View Article


Answer by TobiasP

This is what I did for missiles following an enemy. // Get the direction we need to rotate towards rotation = Quaternion.LookRotation(target.position - this.transform.position); // Rotate towards the...

View Article

Answer by TobiasP

This is a bunch of awesome, free tutorials. [Walker Brothers Studio][1] [1]: http://walkerboystudio.com/html/unity_training___free__.html

View Article

Answer by TobiasP

Basically, OnCollisionStay gives information about the impact ( impact velocity, etc ) as where OnTriggerStay simply says, yes, we have had a collision This will help explain them better then I can! =]...

View Article


Answer by TobiasP

This is from the Unity Script reference in the docs: Note: Make sure the GameObject you are trying to push has a rigidbody // this script pushes all rigidbodies that the character touches var pushPower...

View Article

Answer by TobiasP

If the script is attached to your character use this: renderer.material.color = Color.(choose a colour) Or renderer.material.color = new Color(r,g,b,a); (red, green, blue, alpha)

View Article

Answer by TobiasP

Try this: this.transform.eulerAngles = new Vector3(this.transform.eulerAngles.x, this.transform.eulerAngles.y, 0);

View Article


Answer by TobiasP

IEnumerator Wait() { while(true) { yield return new WaitForSeconds(1); myInt += 2; } } Just use myInt -= 2; if you want it to go down. Hope this helps!

View Article


Answer by TobiasP

First, the variable/method must be **public** To get the a variable or call a method from the parent: Script parentScript = this.transform.parent.GetComponent

View Article

Answer by TobiasP

Ok, So I hope you don't get mad, but I changed and added a few things. The way you were doing it wasn't going to work because it will turn off both player's movement controls and other issues. I made...

View Article

Answer by TobiasP

This is what I did for missiles following an enemy. // Get the direction we need to rotate towards rotation = Quaternion.LookRotation(target.position - this.transform.position); // Rotate towards the...

View Article

Answer by TobiasP

This is a bunch of awesome, free tutorials. [Walker Brothers Studio][1] [1]: http://walkerboystudio.com/html/unity_training___free__.html

View Article


Answer by TobiasP

This should work! healthbarWidth = (currentHealth / maxHealth) * healthbarOriginalWidth; I hope the variable names are representative enough! Hope this helps!

View Article

Answer by TobiasP

This should get you what you want. [Triangle Prism][1] [1]: http://blog.nobel-joergensen.com/2010/12/25/procedural-generated-mesh-in-unity/

View Article


Answer by TobiasP

File - Build Settings: Add your scenes and build! ![alt text][1] [1]: http://i.imgur.com/zvuyxY6.png

View Article

Answer by TobiasP

Spawn an Empty GameObject, place it where you want your object to go, then child your object to the Empty GameObjecy. (I had this issue too but I was using a collectable and manually placing it!) Hope...

View Article


Answer by TobiasP

It should ignore collision between those two objects if specific conditions are met (look at link). [Reference][1] [1]: http://docs.unity3d.com/Documentation/ScriptReference/Physics.IgnoreCollision.html

View Article

Answer by TobiasP

There are multiple ways! GameObject.FindGameObjectWithTag(); GameObject.FindGameObjectOfType<>(); Resources.Load(); The third one you need to make a folder called "Resources". Say you have a...

View Article

Answer by TobiasP

Uncheck 3D sound in the sound's options! ![alt text][1] Hope this helps =] [1]: http://i.imgur.com/rB3Rdlu.png

View Article
Browsing all 72 articles
Browse latest View live


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