Quantcast
Channel: Latest Questions on Unity Answers
Browsing all 171066 articles
Browse latest View live

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 Article


What 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 Article


How 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 Article

Problem 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 Article

measure 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 Article


Assets/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 Article

C# 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 Article

Anyone 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 Article


reserved 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 Article


I 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 Article

I 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 Article

Detect 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 Article

How 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 Article


Do 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 Article

Fresh 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 Article


How 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 Article

Reset 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 Article


How 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 Article

altering 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 Article

Tower, 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
Browsing all 171066 articles
Browse latest View live


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