damage health script ineffective, no noticable mistakes
im making yet another slenderman indie, and i am trying to make it so that when slenderman comes in contact with the first person controller it kills him and resets the location, esentially restarting...
View ArticleWhat is the best way to texture a Blender Model when working with Unity?
What is the least painful way of texturing blender models for use in unity? Some background: I have experience with Blender, but I am relatively new to Unity. I just spent several hours tackling...
View ArticleHow to make moving object with colliders collide properly?
#pragma strict public var Target : Transform; public var speed : float = 2; public var slow : float =1; function Start () { } function Update () { transform.LookAt(Target); if(Input.GetButton("stop"))...
View ArticleProblem with highscore
I make a game with highscores. If you play the game and you earned by example 1000 points. and the next time, if you play the game again and you earned 1200 points. then the highscore will be 1200 and...
View Articlemeasure units in script
if I drop a cube from the game in to the screen it measures 1x1x1 correct and if I change it to 100x1x1 the cube will measure 100 units on the X and 1 unit on the y and z? if this is all true then if I...
View ArticleAssets/Zombies/sharedassets0.asset(1,1): BCE0044: unexpected char: 0x0....
I have no idea why this is coming up can you guys and girls please help!!!
View ArticleC# How to Check If a Gameobject Contains a Certain Component
Hi everyone, I want to check if a Gameobject contains a component such as a rigidbody. How exactly do you do that? I have been searching for an if statement that does that but I haven't found anything.
View ArticleAnyone ever experience not smooth Slerping?
Hello, I use some Slerps to move my camera around my scene. My problem is after painting some more textures on my terrain my slerp isn't smooth. The animation appears jagged and delayed. Almost like...
View Articlereserved words that start with upper vs lower case, what's the difference?
I'm completely new to unity so this might be a silly question but what is the difference between, for example, rigidbody and Rigidbody? And other similar things like gameObject and GameObject? which do...
View ArticleI keep getting the error "NullReferenceException: Object reference not set to...
For some reason I keep getting this error. Also, the same code I am about to present to you not only pertains to the question Im asking but also to another problem Im having with it. This code is meant...
View ArticleI don't understand what I'm passing to addTorque
in this snippet: void FixedUpdate () { float h = Input.GetAxis("Horizontal") * amount * Time.deltaTime; float v = Input.GetAxis("Vertical") * amount * Time.deltaTime;...
View ArticleDetect Color in "If" Statement
Hi, I´m trying to make a system in which I detect the color of a platform I hit, but it doesn't seems to work, how can I detect var + renderer.material.color? Code: void FixedUpdate () {...
View ArticleHow to apply joint's inverse forces to another body
I have a ragdoll set up with a kinematic body (hand target) connected to the hand using a configurable joint. When I move the hand target, the hand is pulled along as expected my the physics joint....
View ArticleDo something when there is no mouse click
Hey, I have a question about OnMouseDown, Right now I have an if statement on in that says that if the mouse is down then do this. Else aplication.loadlevel etc Right now it only loads the other scene...
View ArticleFresh pair of eyes
I've been working on this problem for quite a while now and I've had complete failure at every turn. I finally came up with logic that I swear will work but I have no clue why it doesn't so I need a...
View ArticleHow to switch between two controllers?
I am trying to switch between a Boat and FPS Controller. I have cameras that I want to use with each controller and I only want them to be activated if that controller is activated. Can someone show me...
View ArticleReset level when a moving object collides with a player?
Hey i'm sorta new to scripting and unity. I was wondering if there was a way I could reset the level of my game when a moving object hits the first person controller from any direction the player is...
View ArticleHow can I reference a camera to move it?
Just trying out some basics, failing hard! In my script attached to the camera gameobject, I've attached the camera to the var camera001. Here's the script, where I'm trying to assign a new position to...
View Articlealtering the character controller's deceleration
The character controller has built in deceleration. is it possible to alter this value somehow? or turn it off? I can't see any reference to it in the script reference.
View ArticleTower, get target within range by mouseclick
Hello! I am working on a tower shooter script where I have made the tower shoot at random targets within a certain range. I am now trying to make it so that when I ctrl-click an enemy I wan't the tower...
View Article