Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.

learn more… | top users | synonyms (1)

-1
votes
2answers
49 views

AI shooting through walls

I made a AI shooting script for my new game but the problem is that the AI ignores the walls and shoots through walls. This is my ai script : #pragma strict public var rocketPrefab : Transform; ...
0
votes
2answers
78 views

How to show a float with no decimals

I want to show the current health and stamina of the player using GUI.Label. All is working fine however it shows the values with decimals to the millionth (example: ...
1
vote
1answer
41 views

Move an object up while touch is active

I'm trying to move an object towards the top of the screen while the touch is active. This is my current code. When I am touching the screen, the object I'm trying to move just keeps it's place (and ...
1
vote
2answers
85 views

Unity - OnDestroy - When is it called?

I was wondering about the method called OnDestroy in Unity (4.5.2f1) on Windows 8.1 Update 1. I know garbage collection in C# in non-deterministic, so I was wondering if game objects had OnDestroy ...
0
votes
0answers
18 views

Add terrain collision and fix axis of camera

I made 3rd person camera script which works ok but needs few tweaks which I don't know how to fix. I'm using controller/ joystick. -Firstly, camera has this issue: when I look at the back of the ...
1
vote
1answer
76 views

Sever Structure for a Turn Based Game (Chess)

I am working on a Turn-based Game (Chess) I have done the client part and single player mode so AI is no problem here. But the only problem is now I want to make my project multiplayer. I have done ...
0
votes
0answers
40 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one .When i drag an object in to a selected area the current dragged object get destroyed and the object ...
0
votes
1answer
35 views

Can't consistently add to TimeSpan for Unity Game

I'm making a game that has a timer showing how long the player has survived from being crushed by pessimism. (Long story) I'm trying to use TimeSpan in Unity to accomplish this but it seems that I'm ...
0
votes
1answer
89 views

VertexColor shader is not working correctly in built application

I want to change the vertex colors of my mesh. The light sources must not affect the objects with this shader, its lighting must be determined only by its vertices colors, so I turned the Lighting ...
3
votes
3answers
227 views

Game testing solutions?

I have a unity web browser game. Since I'm working on a small company with limited machines which are all of either 2GB RAM or 4 GB RAM with decent processors. I'd like to know if there are any web ...
-1
votes
1answer
27 views

Object reference not set to instance of an object Unity3D c#

public class player { public projectile pro; pro = GetComponent<projectile>(); void Update() { GameObject go = GameObject.Find("enemy"); Transform ...
0
votes
1answer
68 views

Press multiple switches to unlock the door

I made 2 scripts, one that is a switcher and one that checks if object is switched (Switch, SwitchCheck). Switch script (it's on 2 objects that are switches and both objects have colliders with ...
0
votes
0answers
82 views

from where i should start with 3D games? [on hold]

I'm an android developer, I made several apps, but now I want to make games, 3D ones I want the game to be easily portable windows , etc. I've considered Java 3D library but it seems like its the ...
0
votes
1answer
135 views

Change players state and controls in-game

I'm using Unity 3D Let's say the player is an ice cube. You control it like a normal player. On press of a button, ice transforms (with animation) into water. You control it completely different than ...
0
votes
1answer
31 views

Getting Target position at the time of shooting

I have a bullet that has to hit a constantly moving enemy. So, in BulletScript, I have declared a Transform public Transform enemy; //and assigned enemy object to it that is ...
0
votes
0answers
34 views

How to create normal map from bump map in runtime?

I am using this port of libnoise to generate noise. There are several methods (Noise2D.cs, 462 and 494 line) to output images. Second one, that should give me normal map does not work completely, it ...
1
vote
0answers
18 views

Unity WheelJoint2D will not rotate when increasing motor speed

I have a wheel joint 2D attached to a game object in Unity: In its associated wheel script I am increasing the motor speed as described in the tutorial. public class Wheel : MonoBehaviour { ...
0
votes
0answers
12 views

Unable to get Unity controller.SimpleMove to work? [on hold]

I'm following a tutorial which utilizes a path finding package to enable a unit to track another unit. However, while the pathfinding operates fine ( a green line that traces the path to the object ...
0
votes
1answer
38 views

why there's different collisions point? [on hold]

i have a bouncing ball in my game. every time i start the game, ball direction(a Vector3) and speed are constant. ball have a rigidbody too.i'm using OnTriggerEnter to detect collisions. after start ...
0
votes
1answer
27 views

Animation position changes everytime I play the animation

I've been trying to create a death animation for an enemy object in my scene.I created an animation on an empty object in which i placed all my child objects like hands and legs.I animated them but ...
0
votes
1answer
23 views

AddRelativeForce not working correctly

I am stuck on the code for couple of days but couldn't figure it out. Therefore I turned out to look the answer here but couldn't find any that match the requirement Hope some One might help here is ...
-1
votes
1answer
64 views

How are grids made?

I've been looking at tutorials and researching forums and such but I still can't understand how the grids are made. I get confused at parts like this. for (int x = 0; x < Size.x; x++) { for ...
0
votes
0answers
19 views

Cannot change material color in unity

I'm having an issue where if I set the material color at runtime like so: gameObject.renderer.material.color = Color.black; The inspector shows me the new color but the gameview still shows me the ...
0
votes
1answer
672 views

How to obtain a camera stream from Unity without rendering it to the player's screen?

I'd like to stream the output of two cameras to a separate process. Right now, it looks like the best way to do that is to grab the rendered camera views from the screen via platform specific screen ...
0
votes
1answer
391 views

Creating a curved mesh on inside of sphere based on texture image coordinates

In Blender, I have created a sphere with a panoramic texture on the inside. I have also manually created a plane mesh (curved to match the size of the sphere) that sits on the inside wall where I can ...
3
votes
1answer
2k views

Unity: how to apply programmatical changes to the Terrain SplatPrototype?

I have a script to which I add a Terrain object (I drag and drop the terrain in the public Terrain field). The Terrain is already setup in Unity to have 2 PaintTextures: 1 is a Square (set up with a ...
0
votes
1answer
33 views

How can I implement a more realistic momentum system in Unity 4.5?

I'm just starting out with Unity and am making a simple environment where there is a sphere and a ramp. When the sphere approaches the ramp everything is fine. As soon as the sphere hits the ramp is ...
0
votes
1answer
176 views

Make Gameobject Stand On Surface Facing Certain Direction

I want to make a biped character stand on any surface I click on. Surfaces have up vectors of any of positive or negative X,Y,Z. So imagine a cube with each face being a gameobject whose up vector ...
-1
votes
0answers
20 views

how to make unity3D client handle network message more effectly?

Recently I am working on a Unity3D client program. It will recevie message from game server. I use TCPClient to receive the message aync and store it to a locked queue. As u know, the client must read ...
0
votes
2answers
57 views

OnCollisionEnter2D not being called

I'm fairly new to the world of Unity, and am adding collision detection for the first time through RigidBody2D (as this game is 2D). First of all, here is some relevant information: Unity Version: ...
1
vote
0answers
30 views

unity3d-Find angle between 3 vector3 points obtained from swipe

I was trying to find the angle between 3 vector3 points obtained from the screen swipe. The first vector3 point is the first touch position fp, the second is some intermediate touch ip and the third, ...
4
votes
2answers
220 views

Can I use an AI engine written in C++ in my Unity game? If yes, how can I do this?

I am studying some chess and others AI algorithms and the majority of these implementations are made in C and C++, my question is, if I make a chess board and all the graphic thing in Unity, can I ...
0
votes
2answers
37 views

different Scenes but each of them loads per frame

well i want to have something like restaurant that divided in 3 sections.and the user can switch between these but every Scene loads every frame.for example the character is in the first section and ...
2
votes
2answers
105 views

How to be sure that a target goal in a match 3 game level will not be impossible?

This is clearly not a coding problem but the logical one. I am starting to learn how to make a match 3 game. but there is a question rising in my mind. when i will set goal to complete the level, how ...
2
votes
3answers
110 views

How to display a GUI Texture for a certain amount of time

Is it possible to make a gui Texture display for a certain amount of Time.
0
votes
1answer
62 views

Unity-Animation parameters are not being set

I have the following animation controller: with two parameters of walkingSpeed and Jump. I have the following code which should change the values: animator.SetFloat("walkingSpeed",0.9f); ...
0
votes
1answer
187 views

How do I add a Rigid body and a box collider component to a Texture2D?

I am making a snake game. I'm basing it on a basic tutorial game, which does no collision detection, wall checking or different levels. All snake head, piece, food, even the background is made of ...
0
votes
1answer
22 views

Unity3d : Make prefab follow raycast hit

I've been trying to make a weapon script which fires a projectile (prefab) straight forward.I added to the bullet the first script shown here.And the second one to the main camera.The problem is that ...
0
votes
0answers
26 views

Asking for material to research about game networking and how to create multiplayer games over a network [on hold]

I'm researching about game networking and how to create multiplayer games over a network (local and wide ones), particularly, but not exclusively, with Unity. I found two collections of articles that ...
0
votes
1answer
23 views

GUI Label shows on screen when object is out of view?

I have GUI Labels over NPCs in my game, and the labels display their name above their head. But when I walk away and go somewhere else, their names stay on screen like it's mirrored or something? ...
0
votes
1answer
93 views

Lock mouse in center of screen, and still use to move camera Unity

I am making a program from 1st person point of view. I would like the camera to be moved using the mouse, preferably using simple code, like from XNA var center = this.Window.ClientBounds; ...
0
votes
1answer
51 views

Move a sphere along the swipe?

I am trying to get a sphere curl based on the swipe. I know this has been asked many times, but still it's yearning to be answered. I have managed to add force on the direction of the swipe and it ...
0
votes
1answer
102 views

Automatic Movement

I am making my very first GAME in Unity 2d. At the moment my game consists of 2 walls a floor, a ceiling, and a square which represents the character. After watching some tutorials I have created a C# ...
0
votes
1answer
34 views

Transparent texture over colored polygon?

Let's say I have a cube with each face having a different colour. I want them all to look like brick walls, but I don't want to have to recreate the same brick texture for every colour. Is it ...
2
votes
3answers
2k views

Point lights disappeared when other nearby point lights are above 1.85 range. Unity3D

I'm doing a game with a dungeon, there are quite a few torches lining the walls. I'm using a point light over each torch to simulate the flame. However, when two torches are across from each other, ...
0
votes
0answers
18 views

Access public field of other module in unity [migrated]

I'm trying to read a field from another class library(mod) for Kerbal Space Program. I cannot directly access the field since the compiler is not aware of it and it is of a different namespace. ...
0
votes
2answers
137 views

Problem with moving player through a secript by a set distance

I am currently trying to add a sort of "dash"-ability to my sidescroller. What I try to do, is to let the player press a key where a simple key-press causes the player to move quickly into one ...
0
votes
1answer
52 views

Changing the material on an object on click in unity

Iam working on unity2d.I have six game object Object1,Object1,Object1,(these are images) ObjectImage1,ObjectImage2,ObjectImage3(these are images). I have arranged the object in the scene as a list ...
1
vote
1answer
105 views

Automatic Left/Right movement

First 2d game in Unity. Started Character controller in C#. Tried to get the character to move constantly right then once it hits the wall move left without needing any input from the player. Looked ...
2
votes
1answer
76 views

what is the simplest way to get player selection system like checkers in unity 3d c#

like lets say the board is a top down grid like if your were in front of an actual checkers board i want to figure out how i would be able to select/deselect a piece then select/deselect a space on ...