Click Object to Rotate Camera
Hi everyone. I have come across the problem of rotating the camera when clicking on an object in my game. I have a collider and everything like that it is just the scripting I am having the trouble...
View ArticleFootsteps Script for Running and Walking
Hi everyone. In the game I am currently developing I am trying to add in a footstep sound for when I walk. This will then change to a running sound when I start running. I need some help with the...
View ArticleCharacter controls seen in Amnesia
Hi everyone. How would I make my fps camera rotate slightly to the right or left like it does in Amnesia when you press "q" or "e" for looking round corners? Think of it as touching your ear to your...
View ArticleFlashlight battery script
Hi everyone. I am trying to write a script that will make a spotlight/flashlight run for a certain amount of time, flicker and make a buzzing sound after say 10 minutes and dim slightly, then turn off...
View ArticleClick on collider to rotate camera
Hi everyone. I have come across a problem where I can't get my camera to rotate when I click on a collider. I want to be able to click on a collider and have the camera rotate to look at a different...
View ArticleMultiplayer weather effects
Hi everyone. I have a problem where I don't know how to have things show up in one player's view and not another's. I want to have weather effects in my game but in the "traditional" way with the...
View Article3rd person camera
Hi everyone. I've come across a problem where I can't get my 3rd person camera to work. I want it to be to always be right of the player, but I don't know how to keep them on the right side of the...
View ArticleThird Person Controller Problem
Hi everyone. I've got a problem where whenever I try and use the third person controller with my character, it comes up with this in the console: NullReferenceException...
View ArticleThird Person Camera to First Person
Hi everyone. Is there any way I can modify the third person camera script that comes with the character controller asset to be able to use it as a first person camera?
View ArticleRotation and movement applied to other objects
Hi everyone. Is there a way to have an object "mirror" another object using scripting? Thanks.
View ArticleChanging fog and camera background color with script
Hi everyone. I have this script that I found here [day/night cycle][1]. I was wondering, how do I make the color of the fog and camera background color change to suit the brightness of the light?...
View ArticleInternal compiler error
Hi everyone. I'm getting an error that says: Internal compiler error. See the console log for more information. output was:BCE0011: An error occurred during the execution of the step...
View ArticleFade an object in and out
Hi everyone. I have a script that when the player presses the RendererOnOff button which is e, objects tagged with Player will change material and when e is released it will go back. Objects tagged...
View ArticleTurning torso of character with mouse
Hi everyone. I am currently making a fps game and I want the top half of my character to turn with my mouse. I don't want to have the whole character rotate, as this will eventually be made into a...
View ArticleRandomly generated number
Hi everyone. I've been having problems trying to randomly generate a number between 1 and 10. I'm not sure if there's a specific way to do it in unity, so I thought I would ask the community. Thanks...
View ArticlePlay Animation on Button Down
Hi everyone. I've been trying to get a specific animation to play when the player presses w, a, s or d. Whenever I press w, a, s or d though, nothing happens. This is what I have already. Could anyone...
View ArticleFog rendered outside box collider
Hi everyone. Is there a way to not render fog inside a box collider? I can't think of any way to do this so all help is appreciated. Thanks
View ArticleEnable/disable renderer based on GUI button press
Hi everyone. I've been trying to get different objects to render, based on different GUI buttons that have been pressed, but I haven't been able to get it to work. The final idea is for the player to...
View ArticleSetting the value of a var to the value of another
Hi everyone. I am having a problem of setting the value of one variable to the value of another. This is my script: var MaxArmourValue = 3; var MinArmourValue = 1; var CurrentArmourValue = 1; var...
View Article