Answer by SterlingStudios
You should try a directional light, turn off shadows (unless you want them). You can edit the illumination of the light, and it is the same globally.
View ArticleAnswer by SterlingStudios
Got it. I just needed to replace "ammo.GetComponent(Ammo).ammo += 10;" with "GameObject.Find("First Person Controller").GetComponent(Ammo).ammo +=10;". Here is the final code: (AmmoPickup.js) var...
View ArticleAnswer by SterlingStudios
Okay, I got it. I don't know what I did, just kept re-writing it until I got it. Here's the code: #pragma strict var guitext : GUIText; var phone : GameObject; function OnTriggerStay (other :...
View ArticleAnswer by SterlingStudios
Figured it out. Turns out Unity doesn't like stretched and dynamic meshes. If you look at the beginning of the video, my guy is all stretched out. I moved him back and it fixed it.
View ArticleAnswer by SterlingStudios
function Start () { } var target : Camera; var hasEnabled = false; function OnTriggerEnter (other : Collider) { if(other.gameObject.tag == "Player" && hasEnabled == false) { target.fieldOfView...
View ArticleAnswer by SterlingStudios
Why do all that work when you could just use a string? #pragma strict var animationName : String = ""; var delayTime : float = 1; function Update () { Animate(); } function Animate () { yield...
View ArticleAnswer by SterlingStudios
Haha, you guys are going to punch me for this one. I was using the wrong variable...
View ArticleAnswer by SterlingStudios
Alright I figured it out. I edited the Alpha of the color on the Transparent Diffuse shader, which made it semi-transparent, then I took 0tucan approach and lined them up. I think it looks pretty nice...
View ArticleAnswer by SterlingStudios
If you have a rigidbody on it, make sure all constraints on rotation are checked, else it will have erratic behavior.
View ArticleAnswer by SterlingStudios
Make an animation for it, it's relatively simple. Here is some code: var animationName : AnimationClip; var isOpen : boolean; var inTrigger : boolean; var inSight : boolean; function Update () {...
View ArticleAnswer by SterlingStudios
Why not go GameObject > Create Other > GuiTexture, put your texture in there, make the correct resolution, then attach this script to it: function Update () { guiTexture.transform.position.y =...
View ArticleAnswer by SterlingStudios
Okay, so I got the loot HUD to show up by using guiText.enabled and guiTexture.enabled, but how do I delete a specific prefab? Because I want when you click 'take', the loot pouch destroys itself,...
View ArticleAnswer by SterlingStudios
Solved it. No idea what was wrong. Just kinda played with it until it worked :D. Here it is: #pragma strict var exp : GameObject; var lootBack : GameObject; var gold : GameObject; var destroy :...
View ArticleAnswer by SterlingStudios
You have a semi-colon after the 0 on line 11 that should not be there.
View ArticleAnswer by SterlingStudios
This should work. var speed : float = 6; var direction : Vector3 = Vector3.fwd; var runAnimation : AnimationClip; function Update () { transform.Translate(direction * speed * Time.deltaTime);...
View ArticleAnswer by SterlingStudios
Considering you mean like a temple run move, you could try this (add it in on line 11 or 12): if(Input.GetKeyDown(KeyCode.LeftArrow)) { transform.position.x -= turnAmmount; //cant remember if its x or...
View ArticleAnswer by SterlingStudios
Fixed it. Had to use RPC's. Didn't know what they were, but they weren't too hard to get to know. Also, the blood wasn't being synced, so all I had to do was put "Network." in front of instantiate.
View ArticleAnswer by SterlingStudios
For anyone who finds this post, it was a bug in the version I was using: https://issuetracker.unity3d.com/issues/terrain-brush-tool-is-not-drawing-when-paint-holes-is-selected Just had to update the...
View Article
More Pages to Explore .....