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

Why is my object tilting when moving?

Hello. I am using addRelativeForce to control a rectangle collider. However, it tilts whenever it is supposed to only move forward. How do I prevent this? var forwardMoveAmount = -30; //Sets forward...

View Article


ASP Create contact in AD, user error

Hello I am receiving the following error when adding my contact to AD 2008 R2 [NullReferenceException: Object reference not set to an instance of an object.]...

View Article


How can I make a GameObject invisible while maintaining its interractivity?

I've found out the correct answer but I don't know how to use it. I saw that I must write this somewhere: GetComponent(MeshRenderer).enabled = false; The question is where? Where must I write this?

View Article

Problems with 2d ragdoll

I'm currently making a game using 2d 4.3 physics, and I want to make ragdoll in it. The problem is there isn't an anchor pointer in editor, so I'm almost unable to do it. Is there a way to somehow...

View Article

Frame rate drops with Mesh Collider

I have been using Sphere Colliders for asteroid prefabs, getting frame rates around 100 FPS. I just added a Mesh Collider (and unchecked the Sphere Collider component) and when I instantiate asteroids...

View Article


When do functions end.

I have a function that uses Network.Connect, does the function end only after FULLY completing Network.Connect, like if I would do if(!Network.isClient || !Network.isServer){ ResetPlayer(); } After the...

View Article

Why is my object not moving?

Heres my code. when i click the object isnt moving, just being created. the positioning of the creation is correct but the force thing isnt pushing it. when i click a second time it just creates...

View Article

Can you add an event in a particle system?

Hello. Is it possible to add an event while a particle system is running? For example when using the Animator window for animations, there is a button called Add Event which can call a function of...

View Article


Why doesn't rigidbody2D.AddForce(-5, 2); work?

Assets/Scripts/2DRigid/RigidSwordEnemy.js(54,37): BCE0017: The best overload for the method 'UnityEngine.Rigidbody2D.AddForce(UnityEngine.Vector2)' is not compatible with the argument list '(int, int)'.

View Article


Network Messages/voids, help?

Is there any message/void for when a client joins a server, but the server does not exist(because of an outdated refresh or slow connection)? Also is there any message for when deploying a server...

View Article

How to set GUI X and Y positions from accelerometer.x and accelerometer.y ?

I am new to unity...Can anybody help me in setting GUI label position of x and y from the input of accelerometer using javascript..?...thankyou..!

View Article

Square Dimond Algorythem Problems

hey so ime building a procedural terrain gen using the square diamond method. and ime having some problems mainly the points generated arnt very random and seem to give weird exponential curves ![alt...

View Article

Why is my "yield" statement stopping my script?

Hi, I can't seem to figure out what is wrong with my script. I am creating a roller ball game and I want the ball to disappear when it triggers a hit on the wall. Everything works great separately but...

View Article


Rigidbody causes ragdoll character to fly

Hi, I've created character in Blender, rigged it, animated in Mecanim and wrote scripts to control the character. Everything works great, but when I added ragdoll something went wrong. When character...

View Article

LoadLevel at the end of a sound ! (pb with Coroutine)

Hello I need to load a level at the end of a sound. It works fine the first time but when I reload the level with my coroutine it doesn't work anymore . I got a menu with some buttons, one button leads...

View Article


what is best effective way to make string in to 3D GUI

1. No I'm not creating a unity GUI or whatever, because it doesn't work on Linux. all buttons are 0.0f width. 2. I haven't went doing this so no actual code can be provided when I'm stuck or whatever....

View Article

NullReferenceException: Object reference not set to an instance of an object...

why do I get the above error when I try to switch weapons ?(its either line 93 or 102) my C# code: using UnityEngine; using System.Collections; public class FPShooting : MonoBehaviour { //generic...

View Article


[C#]Inventory script help.

Hello whoever is reading this. I wanted to get more advanced in my programming so i tried to make a Inventory. But there are some stuff i do not understand. and that is why im asking this question. i...

View Article

I need help making this script work for android touchscreen

I am trying to develop a JavaScript that will allow me to rotate the character in z axis by swiping left and right on my android device. Here is what I have But it only works on pc. // Smoothly tilts a...

View Article

MovieTexture getting null reference

There must be something i'm missing? MovieTex = (MovieTexture)Resources.Load(Application.streamingAssetsPath + RC.MovieTex, typeof(MovieTexture)); if (MovieTex.isReadyToPlay &&...

View Article
Browsing all 171066 articles
Browse latest View live


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