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 (1)

0
votes
1answer
65 views

2D game world engine

I'am starting to develop a 2D game with snake or worm. My question now is: When my snake reaches the right edge the world should move. (Like in this game) My first thought was to implement a camera ...
1
vote
0answers
57 views

Create a 2D orbit trajectory like in angry birds space and a circular orbit

I am working on a 2D game, and I am working on adding some space physics : I need to find a way to create a circular orbit and an orbit like angry birds space ( the spiral trajectory ) . So there is 2 ...
2
votes
1answer
66 views

Speed needed to make a car jump from a ramp

I need to make a car jump from a ramp to another, and I need this to be done using AI so I thought it would be enough to set a fixed speed for my car when near the ramp, in order to let it jump ...
0
votes
0answers
34 views

How to make Unity3D Camera focusing on one area?

In my Unity3D project, I have a board created dynamically (using c#) and located on the screen as follow: 0 < x < 12 0 < z < 12 y = -1 How can I make the camera focusing on the board ...
0
votes
2answers
43 views

(Unity) Physics based movement vs Straight position change

Unity provides a cool physics engine for game development and I want to utilize it in my game. Shorter version I want to use physics engine for everything else other than character movement because ...
0
votes
0answers
50 views

unity3d - AI terrain detection

My goal is to have my animals walk around within a certain range. Everything works except for when it comes to the y axis. I can choose a position for it to walk and it will go there but I have no way ...
1
vote
1answer
93 views

How to cast colored shadows

I have a glassy object and when light passes through it I want it to cast colored light behind it, instead of the shadow. I could just use another light object to cast that colored light, but is it ...
0
votes
1answer
45 views

How to force a translation to go through an exact point?

I have a camera object with a script that will whether translate it with a set speed, or stop it. I also have 7 "checkpoints", where there are 7 different quads, who will stop the camera whenever the ...
1
vote
1answer
68 views

Unity 2D: Sprites/Diffuse is making my character weird, like an antialias

i'm trying to put light and shadows on my 2D character but when i set the material on it to Sprites/Diffuse, it's kinda putting a strange smooth on my pixels. Without diffuse: With diffuse: And ...
1
vote
1answer
54 views

Why doesn't OnCollisionStay execute continuously?

I'm currently trying to build a simple demo where the player can jump. This is the script I have setup so far. using UnityEngine; using System.Collections; public class PlayerJump : MonoBehaviour { ...
2
votes
1answer
145 views

Pathfinding in a 2D “sidescrolling” strategy game

I've been thinking up a real-time strategy game that plays on a platformer type of map. The collidable portion of these maps will be made up of square tiles. I've done A* pathfinding in top down tile ...
0
votes
1answer
35 views

Unity PHOTON/PUN Collision Detection

I am trying to create a virtual 3D chat room based on character interaction (just like in Sims2), so I have added a collider on the "user's in-game character". The problem is that when I enable the ...
1
vote
1answer
65 views

Polygons requirement on mobile devices, around 3000 vertices?

I read on the unity documentation that a character should be between 300 to 1500 "polygons" on mobile devices to have good results. In Blender, we have "tris" or "faces", does "polygon" stand for the ...
0
votes
2answers
37 views

Deleting fewest Navmesh Obstacles when no valid path is found

So I'm building a Tower Defence, with mazing (i.e. the player can place towers to make the mobs take a longer route to there destination.) I'm using Unity's Navmesh system. Each Enemy unit has a ...
0
votes
2answers
71 views

Doing object movement in a loop in unity

I have a Game Object at position (0, 0, 0). To move it to position (2, 2, 2), I'm using this code below - void Update () { Vector3 TargetPosition = new Vector3(2, 2, 2); transform.position = ...
1
vote
1answer
55 views

Instantiating prefabs dynamically in script

I have a canvas object. I right click it and add a Button, which defaults to having a rect transform, image script, button script and text child object. I make it a prefab and delete it from my ...
1
vote
1answer
26 views

Why do Unity networking libraries fail when building for the Windows Store?

I am using Lidgren and RSA in my networking framework, but things like IPAddress are "nonexistent" when I try building for windows store. RSA classes don't work, either. Why is this? How could I ...
0
votes
1answer
46 views

Any way to visualize how will game objects look on different screens?

After completing my game and sending it to a bunch of friends with different devices, they complained about how some game buttons were too small. (I have developped a touchscreen game but after ...
0
votes
0answers
29 views

Outline of plane slice of arbitrary object

How would you extract the outline of a shape from slicing a plane through an arbitrary object? Note: This is related to my Unity Answers question, but not exactly the same.
1
vote
0answers
36 views

How can I hide an object for one eye for the unity oculus rift DK2 platform?

I am trying to build a game for my son for the Oculus Rift DK2 to help treat his lazy eye using Unity. I need objects that: Appear only to his left eye Appear only to his right eye Appear for ...
0
votes
1answer
48 views

Unity 2D: Change one instanced prefab then make all the others on the scene like it

I want to get this thing working: I have a prefab with coins, some obstacles and enemies, and i want it to be instantiated each time the player got to the right or left on the stage, to make the stage ...
0
votes
2answers
130 views

Is it possible to use one if statement for each level scene?

I'm working on a platform game where you as a player have to collect logs, to keep on all the fires in the level. Each campfire has a timer, which ensures that every x number of seconds the animation ...
0
votes
2answers
45 views

Detecting on which side did the objects collided unity 2d

I have a ball and a rectangle in my game. The rectangle has a box collider 2d attached to it. How can I calculate or check when the ball hits the top of my collider, when it hits the bottom, left and ...
0
votes
0answers
42 views

How to slow down a Sphere smoothly in a world controlled by force and stop it (Unity 5)?

I am a beginner and I started to use Unity 5. I play with tutorials on the site and documentation. I was basically testing springs, physics materials etc. I have a problem understanding probably a ...
0
votes
2answers
55 views

2D physics on game object made up of components

Say you want to let your users create a 2D airship (side view) made up of components. One component could be a floating balloon, another could be a storage room, etc. And say you want this airship to ...
0
votes
0answers
30 views

Unity Buttons and selecting Objects

I'm making a tower Defence Game. and my buttons are working fine... Until i select and unselect a tower. what I've worked out, is that after I've selected a tower the follow section of code sets my ...
0
votes
0answers
59 views

Unity 2D Game: Camera following target and looping stage

I'm with a problem and I need some help, because I'm on early learning of gaming and Unity, and i want to learn doing it, so, i need all the help, you developers know how each little help, helps a ...
-2
votes
1answer
40 views

Unity skips menu screen and goes to next scene

I am using Unity 4.6.1 and I am working on a game project. I created a JS script with Application.LoadLevel to go to the next scene. Here is my code for OnGUI: function OnGUI () { { ...
0
votes
1answer
59 views

Loading Screen And Coroutines Unity

When I want to load another scene and show my loading screen to the user - my loading screen is a game object holding a canvas, I use coroutines, but when I type something like this: ...
-1
votes
2answers
50 views

Get position of currently instantiated object [closed]

I have Variable Temp which is Vector3. And i have variable next which is of type Transform. In the inespector, i have dragged an empty gameobject to "next". In my update, i have: temp=new ...
0
votes
0answers
114 views

Issues with character controller (unity 4 project in unity 5)

I'm having the weirdest issues with a game me and a mate have been working on. They came up immediately after moving from the last version of Unity 4 to Unity 5. The two objects (player and enemy) ...
0
votes
1answer
33 views

How to modify the Unity sprite renderer (or create a custom one) that can display the sprites on the X-Z plane?

Prefix: I am NOT trying to rotate a sprite 90 degrees by it's transform, this changes what is up/down and forward/backwards for the object. I need the sprite displayed on the X-Z plane in comparison ...
1
vote
1answer
54 views

Determine which face of a cube is facing the camera

I have a Cube with a unique color for each face. I made a script where I can swipe and rotate the Cube in increments of 90 degrees in each direction. what's the best way to determine which face of a ...
1
vote
1answer
43 views

Check for collision without any built-in collision functions

Is it possible to check for a collision between gameObjects without using the built-in functions OnCollisionEnter, OnCollisionStay, or OnCollisionExit? Preferably a solution without the use of ...
0
votes
1answer
28 views

Unity only rendering certian parts of 3d building model from certian angles

So I made a couple modular building sections in blender, modular in the sense that I can insert build a floor at a time. I transferred them into Unity and then I got a rendering error that I have ...
0
votes
0answers
50 views

Creating a 2D game on the X-Z plane instead of the X-Y plane in Unity, any adverse effects or challenges with this?

After coming to the realization that some things I wish to do in a 2D RTS are easier to do on the X-Z plane instead of the default X-Y plane, I'm considering moving my game over to the other plane. ...
1
vote
1answer
60 views

Why the size of my game increased on deploying it to Android using Unity3D?

When I deployed the game to 'Web Player', it's size was just 2.4 MB but when I deployed it to 'Android', it's size got increased to 38 MB. Why this happened? Please answer this, I can't provide any ...
0
votes
0answers
32 views

Server send commands to client side AI

Hello everybody i have recently found Unity3D, now i am planning to develop a Network-based game( not going to release it or anything like that, just for the experience of going from bottom to top). I ...
0
votes
0answers
31 views

How do I use two or more shaders in the same object in unity

ok guys, so I have a basic ramp shader I copy from the unity shader cookbook. It's just a basic ramp shader. And then I got another shader I got from the unity shaders wiki, which is basically an ...
0
votes
1answer
30 views

Coding a left/right object movement C# script for android phones in unity

I have 2 spheres and a cube on screen. I'm experimenting to make a 'left/right movement script' for the cube so that when I touch the left sphere, the cube moves left-wards and when I touch the ...
1
vote
1answer
81 views

Collision, triggering, and range detection in an RTS. What are the optimal solutions for unit spatial awareness?

I've finally ran into the problem of multiple triggers and collisions within my 2D RTS. Up till now I've been using unities sphere colliders as a way of simulating spatial awareness. To trigger when ...
0
votes
0answers
25 views

How to hide an object when a character enters it?

I have written the code for my character : void OnTriggerEnter2D (Collider2D other) { if (other.tag == "Star") { } } When my character enters or passes the 2D object, I want to ...
0
votes
1answer
68 views

How to bounce the player away after attack by enemies?

I creating a 2d platform game. I would like to bounce the player away after hit by the enemy, so the user get another feedback beside the sound effect. How can I achieve my wish? Use the following ...
0
votes
1answer
45 views

Unity C# 2D Platformer Main Camera should stop on sides of level

I've been working on a 2D Platformer and i succeeded in setting up a script for my Main Camera to follow my Player gameobject using transform positions. Now when my character is near the sides (or ...
0
votes
0answers
18 views

C# Pathfinding in 2d array (procedural generation) [duplicate]

I have the following random example data in a 2d array 030 300 030 003 The 3 represents a room, the 0 represents its an empty block and 1 represents a corridor. Now i want for example the following ...
0
votes
0answers
70 views

i cant animate my character using animator controller

i have been stuck with the following project for a couple of days now. no matter what i do i cant make my character transition between idle and walk animation. i have been tweeking almost every option ...
0
votes
1answer
21 views

How to play Sound of a Destroyed Object

So I have implemented grenades, and thats working fine. Now I want some explosion sound, but the problem is that the sound is still playing when the grenade is explode and I Destroy the grenade. Does ...
0
votes
1answer
40 views

Everything black except where there's a light

I have a camera in my scene with a map created at runtime: As you can see everything can be seen. Now I want the map to be invisible (black as the background) except where there are lights. How can ...
0
votes
0answers
19 views

Trouble with Inaccurate Mesh Collider

I'm stumped as to why (sometimes) when I apply a Mesh Collider to a procedurally create mesh, it is sometimes completely correct, but other times completely inaccurate. In Detail: I'm creating a ...
0
votes
2answers
38 views

How to play a sound by C# that is linked to the object with AudioSource?

I trying to play a sound while the player is ontriggerenter. The sound is linked to the object with a AudioSource component. But notting happened. using UnityEngine; using System; using ...