Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

learn more… | top users | synonyms (2)

0
votes
1answer
56 views

Zoom in and switch scenes in unity

I'm trying to zoom in as my game is like a map and I have to click on a certain country to zoom in and change the scene to this country. So I want to zoom the camera slowly and then change the scene ...
1
vote
1answer
25 views

How to distinguish between full/partially intersecting Collider2D?

I'm using Unity 5 to make 2D game. I have a screen (gray), arena (green) and player-controlled object (yellow) that can be moved across the screen with mouse before placement: There is no ...
0
votes
3answers
65 views

How do I make my Unity application quit programmatically?

I made a script and I want to make my game quit, but this does not work. How should I go to make the app quit? using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public ...
0
votes
1answer
46 views

my android game works very well on unity editor but not on device [closed]

Im working on a android unity project. My game works very well on the editor but, when i build it and run it on blue stacks emulator, it starts working corruptly. Bullets shoot twice in a time. When ...
1
vote
1answer
40 views

How to use NoSQL REST API of Gamesparks in my Unity project? [on hold]

Gamesparks has a documentation of the API but I am not sure how to send https requests to use that API.
-2
votes
4answers
95 views

How can I exclude a range of values when generating random numbers?

If you are using Random.range to generate values, is there any way to exclude some values within the range (for example: pick a number between 1 and 20, but not 6 through 8)?
1
vote
2answers
23 views

Modify the Y position of a GameObject on startup

I'm trying to modify the Y position of a GameObject on startup with the script below: int y; void Awake() { y = Random.Range (140, 155); Vector3 temp1 = transform.position; ...
1
vote
0answers
37 views

How to manage collision of two player ?

I'm developing a multi-player car game. Suppose that car A hit car B: both A and B have Rigidbody and collision functions attached. Because car A hit car B i want to take actions only to car A (add ...
0
votes
1answer
12 views

Playing an animation all the way through with one quick keypress with Mechanim Unity

I have an if statement inside of the Update function that is only called if three other conditions are met. The problem is that right now the function sets a boolean to true which causes the animation ...
0
votes
0answers
40 views

How to make character select menu? [closed]

I want to make racing game but I cant make car selection menu my game is android game and I want any thing that can help me to make the selection car scene
1
vote
1answer
35 views

Unity rope/cable physics / anchor points

I'm creating a cable in Unity, which should behave realistically. I found 2 different ways to approach the problem. First was to simply rigg a subdivided cylinder in Blender, Cinema4D or whatever ...
0
votes
0answers
17 views

How to do a 2D companion for a Unity 2D platformer? [closed]

Ok this is really a concept and where in the world to start to make a companion for a player. How should I start off on my code??? What are the concepts i need to understand????
1
vote
1answer
47 views

In Unity, Change which mouse button is used to scroll in ScrollRect

I've created a new ScrollView in Unity. How do I change which mouse button is used to scroll in ScrollRect (through script or in the editor). By default it's the left mouse button. I'd like to be ...
1
vote
3answers
95 views

Unity AddForce causing twitch

Since this wasn't clear enough, I've removed even more code. It kind of defeats the purpose I was aiming for, but I guess getting any answer relevant to the problem is better than none. What I want: ...
1
vote
1answer
39 views

How to stack sprites?

I am currently working on a 2D game in Unity, I am using Animation Controllers / Animators for the different slots of armor on the character. The scripts set the Animation to the player object and ...
1
vote
3answers
429 views

UNITY : I want to make my UI text fade in after 5 seconds

I know this question has been asked and asked but none of the topics i visited gave me an answer. I'm making a game programmed in c# where you control a boat and i want my UI to appear smoothly by ...
12
votes
0answers
158 views

how to automate the game testing?

I am new into this field of testing. I just developed a basic game using unity engine but i want to test it. I have checked with selenium but i don't know how to get the value that is being returned ...
1
vote
1answer
49 views

unity 5.x performance

after I downloaded unity 5, it became very consuming, my pc becomes hotter and makes a lot of noise. also building, compiling, baking of game takes a lot of time, I am making multiplayer game and need ...
0
votes
2answers
46 views

snap an object to another object?

so I have some walls which are cubes stretched along a direction.and I have some windows and doors that are suppose to snap to a wall and don't let go until the desired location is out of the snapping ...
0
votes
1answer
21 views

Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
0
votes
1answer
27 views

Unity 2d square position not lining up with its size

I want to have one square that rests at the Unity 2d coordinates (5,5). Using transform.localScale I make the square be 3 units by 3 units large. So I thought that if I made another square that is the ...
0
votes
1answer
68 views

Detect collision with static collider only

Is this possible to detect collision with static colliders only I check it is not working. I dont want to use rigidbody or character controller with my box collider.
1
vote
1answer
29 views

Joint based destructible physics (like Armadillo Run)

I've implemented a destructible terrain system like Worms before (where weapons create holes in the terrain), but for the game I'm designing I want something more like Armadillo Run: https://www....
0
votes
0answers
42 views

Unity Game Hang

I've created a prefab for coin. The Scenario is like that : When player collides with coin, the coin will move towards coin image(coin image is one which is displayed in header for information purpose)...
0
votes
0answers
24 views

Rect Transform doesn't reset after animation is over

Usually everything resets after an animation is over, but for some reason the Rect Transform positions don't reset. Exmaple: Left value is 0 at the beginning, after that animation changes it to 500, ...
2
votes
0answers
27 views

Unity raycast misses convex mesh collider

I have a bunch of fighter AIs that are doing attack runs on a target (Currently just a cylinder). It is designed to veer off course the moment it gets too close and loop around for another attack ...
1
vote
1answer
57 views

Unity question: When attaching my custom camera script camera shakes when player starts to move fast [duplicate]

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float smoothTimePos = ...
1
vote
1answer
36 views

Unity Vector3.Angle() direction

I have a space fighter AI. I need to determine how to pitch, yaw and roll the craft to aim at the target. My current solution: To obtain the Yaw angle to position the target above the fighter, ...
1
vote
2answers
31 views

Check which object trigger another

Two animated car object both contains rigid-body and box collider and a script with OnTriggerEnter event. Now I want to check that which car hit to another car. Means if A hit to B or b hit to A as ...
0
votes
0answers
20 views

Unity alpha of all parented canvas groups

I'm codin aberration effect for Unity UI. It's works great, but I wish to control aberration intensity via rendered object's alpha. So for example if i have parented canvas group with alpha 0.5 I ...
0
votes
0answers
13 views

IPointerDownHandler not working on Android

Why does this work in the Unity Editor, but not on my Android device? using UnityEngine; using System.Collections; using UnityEngine.UI; using UnityEngine.EventSystems; public class TouchStick : ...
0
votes
1answer
16 views

Touchpad Unity UI

For my Unity game, I want a touch surface (UI Panel). I started implementing a MonoBehavious that should handle touch-started, touch-ended, touch-moved/dragged and double-tap with custom methods. I ...
-1
votes
1answer
46 views

Unity: When attaching my custom camera script camera shakes when player starts to move fast

Here is my player code. Rigidbody rb; Vector3 currMovement; public float jumpSpeed = 10; public float moveSpeed = 10; public float rotSpeed = 180; float distToGround; public float posSmoothTime = ...
1
vote
0answers
23 views

Unity play sound from Audio Source

I'm using the following code to play a sound in Unity 5: AudioSource aud = GetComponent("doorSound") as AudioSource; aud.PlayOneShot(aud.clip, 1.0f); But no sound is playing at all. What am I doing ...
1
vote
1answer
58 views

Full Engine or Not: C++ Programmer Trying to get into Game Development [closed]

I'm a fairly experienced programmer, and I want to try out doing some game development. However, I am unsure of whether or not to use a full engine like Unity or just start with something like OpenGL. ...
1
vote
1answer
27 views

How to use Resources.Load with an AudioClip in Unity?

I'm trying to load an audio clip that's in my assets directory and play it. Here is my C# script: if (Input.GetKeyDown(KeyCode.X)) { audioSource = gameObject.GetComponent<AudioSource>(); ...
0
votes
1answer
38 views

Unity 2D C# Enemy Attackng Ai issue

Ok to be specific, both of my enemies will continuously play their attack animation even when it is false. I don't understand what I am doing wrong here :( void OnTriggerEnter2D(Collider2D other){ ...
0
votes
1answer
47 views

How to calculate 2D viewport coordinates in a shader?

In Unity, I use the following shader to calculate 2D viewport coordinates : Shader "Foo" { SubShader { Pass { CGPROGRAM #pragma vertex vert ...
-4
votes
0answers
29 views

Is there any way to have a Character Controller be pushed by a rigidbody?

Noob question, any help appreciated. Thanks
1
vote
0answers
26 views

Unity: Implementing Fall with Animation

I have a character controller. I am primarily using FSM with the animations and blends. However, I am running into some trouble with the fall. I walk up to a ledge and walk off...sometimes I will ...
1
vote
1answer
38 views

Check rotation before rotating

I am making a puzzle game in Unity. I have several GameObjects that have children objects where each child object has a BoxCollider2D. The game requires that the pieces be rotated, but to position ...
0
votes
2answers
35 views

Unity Non-shader method of combining two RGB Textures into a single RGBA Texture

I work in a broadcast environment that delivers video signals over SDI as Fill (RGB) and Key (A) signals. My SDI rendering method produces a Texture for each SDI input and applies it to a material. I'...
1
vote
1answer
29 views

Unity Surface Shader: Conditinally noforwardadd

I'd like to have this in my shader: #if SHADER_API_MOBILE #pragma surface surf Lambert noforwardadd #else #pragma surface surf Lambert #endif But this tries to compile both #pragma surface and ...
0
votes
1answer
17 views

Unity: Increase animation speed of individual component in a blend tree?

I have blend tree with four different turns: a sprinting turn, running turn, walking turn, and standing turn. I need to somehow make the angular velocity increase from sprinting down to standing, ...
0
votes
0answers
19 views

a good way to save eddits on game in unity [duplicate]

im going to add a feature that lets player edit a map and put objects there and... i want to know how can let him save the edits for starting a game? for example a player puts player spawn tanks ...
0
votes
1answer
21 views

Disabling object OnCollisionEnter and Enabling it On Collision exit

I have two objects that when they collide disable another gameobject. The problem is that I only want to have the other game object disabled while the two objects are touching and that I want to have ...
2
votes
1answer
111 views

How to add constant force to player with sperical gravity planet.?

I have a planet and character. My player move perfect around planet with pressing key like 'w','s','a and 'D'. I want to move my player on every frame with same force around sphere. I try plane ...