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
vote
2answers
125 views

Object goes straight through game object without colliding

The "shot" is supposed to collide with the left bumper and then be destroyed, but the shot goes right through it. Both objects have a box collider. The following is the code I am using: #pragma ...
0
votes
1answer
58 views

Can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D?

In Unity2D, can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D? I would like to move my character using the circle physics (without fixed-angle), but display him always as if he ...
0
votes
1answer
212 views

How do I efficiently display image tiles in Unity 4.3 free

I previously wrote a TileEngine with SFML that I would like to port to Unity3D 4.3, but have not found a way to draw a tile on the screen programmatically in Unity. All I am looking for something ...
0
votes
0answers
62 views

Swiping with rigidbody

My character moves continuously forward with rigidbody.velocity = v3Force * strength; My Swipe script is based on a youtube tutorial from https://www.youtube.com/watch?v=9ZIHx09GevI I just changed ...
1
vote
3answers
155 views

How to manage variables and/or data?

Let's say I have a class A with many constants (over 20) and variables (also around 20). Class B represents a character so it has a lot of constants and variables representing various stats. Class C ...
2
votes
1answer
126 views

How can I create or extrude a mesh along a spline?

Let's say, for example, that I have a working spline. I want to use this spline to create a mesh, but I'm not quite sure how to go about it. For example, I want to create a road along this spline. I ...
0
votes
1answer
117 views

Background Sprite Setting

For my 2d game, I want to set background image. So that I am using multiple background images for that purpose. But it can't set correctly on screen that illustrated in following image. Also for ...
0
votes
2answers
155 views

Stormy water like Temple Run 2 for Mobile

How can I make stormy water like they did in Temple Run 2. I've tried with Unity Water Pro to achieve the same result but when I include it in the project the frame rate crashes to 3 frames per ...
0
votes
0answers
82 views

How to implement 2D Ai Wandering with 8 - directional movement using Perspective Images in unity 4.3?

My requirement is to move a 2D characters with perspective view images has to wander in game area by choosing dynamic path and according to that the AI character has to switch the animations based on ...
0
votes
1answer
91 views

Free Look Camera Like Arma 2 while pressing ALT [closed]

I'm trying to create a simple script that give me the possibility to rotate the camera while pressing a key. So, in a pseudo-code way, how I can intercept the Input event and limit the player's ...
0
votes
1answer
73 views

'Dynamic' textures?

I am creating a 3D game in Unity. The main game mechanic involves a large open world area. In various places throughout this world are billboards and other devices that would show 'adverts' etc in the ...
2
votes
0answers
65 views

Unity3D — WAV plays an octave too low on Android

I have generated a synthetic 'concert pitch A' tone from sinewaves. It plays properly on OS X player, and on my Android device. Now I record myself singing a 'concert pitch A' into the microphone as ...
0
votes
0answers
76 views

Realistic collisions with a kinematic rigidbody?

I have a car game where player drives a car; this car has a collider and a kinematic rigidbody attached and is completely controller by script (i.e. a script sets its position and rotation). In the ...
2
votes
1answer
159 views

How can I manually draw a Sprite in Unity?

I'm creating a simple workaround on the unsupported prefab-on-prefab. I've thus created this simple class: [ExecuteInEditMode] public class PrefabLinker : MonoBehaviour { public GameObject ...
1
vote
2answers
92 views

Unity - Across the wall

I have a problem here. I animated my main character and is working. It walks run and jump however it goes across walls and ground. As in every single video I watch in unity tutorials I put a ...
6
votes
1answer
224 views

How do I make a slot car game?

I new to game development with Unity and my first project is a slot car racer. For a realistic slot car-like-driving experience, I first build a track with a channel in the track and a pin on the car. ...
1
vote
1answer
315 views

Unity Move sprite from point A to point B

Pretty new to Unity and i'm trying to make a very simple iphone game. , I'd like to know how to move a sprite (2D) move from random point A to random Point B not just that, but i want it to change ...
1
vote
1answer
68 views

Different OnMouseDown functions based on where an object is clicked

So my problem is I'd like to have one GameObject with multiple "OnMouseDown" functions. I have a target (classic looking bullseye) and I'd like to award a player say 10 points if they click on it, but ...
1
vote
2answers
105 views

Android Activity access Unity Classes

I have made my own C# classes in Unity, is there any way I can access these classes from the Android Activity that starts the UnityPlayer? Example: I have a C# class called testClass in Unity: class ...
3
votes
4answers
95 views

How can I avoid updating my Unity projects when I have two versions installed?

I currently have two versions of Unity on my Windows computer. I would like to not update my projects to avoid compatibility issues like I had in the past. Installation in another folder goes just ...
5
votes
4answers
461 views

Does Unity let you code in Java?

I am fairly new to Unity3D experience , but I have a very good knowledge of Java and Android development. I am really confused that if Java is at all needed for developing android applications? I read ...
2
votes
2answers
94 views

Do I have to use new keyword for unity single game object?

I'm using Unity4. Do I have to use new keyword for single game object? look at the following code. 1. GameObject obj = new GameObject(); obj = Resources.Load("Prefabs/Ball", typeof(GameObject)) as ...
2
votes
3answers
1k views

How to reset the world in an infinite runner game to prevent an overflowing float?

Im following Mike Geig's 2D infinite runner tutorial. However, I'm seeing a potential problem of overflowing the float How can I reset all objects and camera back again to the origin? The approach ...
1
vote
0answers
140 views

Photon unity networking PhotonNetwork.Instantiate issue

I am using Photon Unity networking. I am using the PhotonNetwork.Instantiate function to spawn players on local and remote devices (iOS and android). Newly connecting players automaticaly spawn at ...
1
vote
1answer
141 views

Unity 2D camera drifts from player as speed increases

I have a dilemma that I did not have in XNA before porting my game to Unity. First-- my goal is to mimic Super Mario World 2's camera tracking in x. The camera tracks to 1 block ahead of the player, ...
1
vote
2answers
113 views

Hide part of the GUITexture in Unity

I have a Health Bar in my Unity game and it's implemented as a GUITexture with gradient image from red to green. Now I can reduce it's width from max width to 0, but is still scaled gradient. ...
3
votes
2answers
156 views

Using this.GameObject

I once read (I actually don't remember where, I'm looking for it) that using this.GameObject to call the script owner is a very bad practice. I believe it has to do with some sort of information ...
3
votes
2answers
588 views

Unity - Part of the sprite is covered in shadow

I have a sprite with Transparent/Cutout/Diffuse shader. Recieving shadows is turned on in SpriteRenderer. The light is a pointlight and I am using deffered rendering path. However when I am above or ...
1
vote
0answers
79 views

Unity crashes completely when I rotate my objects

I've started my first tiny Unity project and after 20 minutes I run into a brick wall. My goal was to create a Android 2D game with falling polygons, that you have to click and they disappear. ...
4
votes
1answer
97 views

Why are cube map axes sometimes labelled incorrectly?

In both 3ds Max (which uses a right-handed coordinate system) and Unity (which uses a left-handed coordinate system), the cube map faces labelled "left" and "right" show the view facing the opposite ...
1
vote
1answer
131 views

Scaling HUD and Camera

I wanted to display an HUD, similar to the strategic games' one (like in DotA 2, Warcraft III, Starcraft II or Age of Empires). I didn't really know how to do it, so I managed to create a Texture ...
2
votes
1answer
76 views

Unity - Quaternion - Rotate / Unrotate Error

I'm trying to unrotate a quaternion, aligning it with the axis, and then rotate it back to where it was originally. But with every iteration it seems to lose precision and just after 20 iterations the ...
0
votes
0answers
24 views

Separate shape in to a new object in Wings3D

I am working on a 3d model and I am having the following question: If you have one solid object and you have a specific part that you want to separate into a new object so you can move it and Unity3D ...
0
votes
0answers
107 views

Android Proguard with Unity3d return error code 1

I am using the proguard 4.11 with the Unity 3d In my project , I have include the unity-classes.jar in my libs folder When I generate the apk , it gives the following exception [2014-05-03 ...
1
vote
1answer
242 views

Dynamic 2d terrain loading / stitching in Unity [closed]

I'm currently working on a top down 2d game (in Unity 2d) where I'd like to build a huge terrain for the player to explore. My question is - do you have any good practices or ideas on how to chunk the ...
4
votes
1answer
450 views

How to edit key-value pairs (like a Dictionary) in Unity's inspector?

I have a spell system I am creating, the principle is as follows: Each spell is an autonomous prefab. It contains a script with some properties (base damage, duration...) that can be modified in the ...
1
vote
1answer
117 views

How can I unify the collision handling of melee/spell attacks in a networked environment?

I am trying to figure a good way to create the battle system of a game. The game is fast paced and the gameplay needs to be precise (think hack n slash) What I would like to achieve is a simple and ...
0
votes
1answer
60 views

Unity what are the rules for determining sizes of gameobjects

I am making a game for windows phone. I am a newbie so currently I am unable to understand if I have to make a simple menu for a game targeting portrait mode always, what should I give the background ...
1
vote
2answers
170 views

How to change transform.position.x after a state is changed?

When I press attack button, player will change to Normal Attack state to perform Normal Attack animation and you will notice the player seem like step back a little bit as the width of sprite for ...
1
vote
2answers
171 views

Unity3d not allowing endpoint to save cookies

So I'm using an external DLL with Unity to login to a web service and access functions from it. The DLL works perfectly fine in a command prompt project, but when run in Unity I can log in ...
0
votes
1answer
64 views

Are there still favored of using bluetooth devices today in modern games for multiplayer gameplay?

I was wondering. Most multiplayer gameplay always favored by Wi-fi during team-up or to compete each other. I know that when in comes in huge groups (say 100 to 500 players or more online) in online ...
0
votes
1answer
284 views

How do I set up Unity for Eclipse?

I want to use Unity on Android. How can I integrate Unity with Eclipse? I searched this site and various forums, but found nothing useful.
1
vote
1answer
97 views

Unity Vectrosity line drawing duplicates

I'm using vectrosity in my project and I'm having a problem when loading a level for the second time in a single session. When I load the level the first time, no render problem as seen HERE But ...
0
votes
0answers
102 views

Shooting on an Authoritative Server StackOverflowExecption error (uLink and Unity)

I am trying to get shooting working on an authoritative server example found in http://developer.muchdifferent.com/unitypark/Tutorials/uLinkPhysicsOnServer (ULink is used to create a scene where ...
0
votes
1answer
125 views

How do I animate Unity GUIComponents?

I want to transform my GUIWindow from the bottom of the screen to the middle whenever the user presses a button. How can I do this?
2
votes
1answer
138 views

How to display Textures, Buttons, Created with Unity's GUI (OnGUI()) to get displayed behind other objects in Scene

I am making a game in which I am using OnGUI() to make Texture. I want this texture to display behind my Regular 3D objects like cube, spheres in the scene. I have tried and searched but I am unable ...
-1
votes
1answer
64 views

Unity's pack 4 floats

Linked to: GLSL pack floats into an RGBA texture I found EncodeFloatRGBA/DecodeFloatRGBA shader functions in Unity https://gist.github.com/hecomi/9580605 Now I try to figure out how they work. So I ...
2
votes
2answers
273 views

Endless 2d runner with increasing speed, how to adjust jump behavior?

I am making an endless 2d runner with unity. my player object is not moving at all, i move all the other game objects. I have a SpeedManager script which increases the "speed" at every update by a ...
0
votes
1answer
115 views

Could you explain this calculation of tiling and offset?

I don't understand why we add +colNumber when we calculate the offset = Vector2 ((uIndex+colNumber) * size.x, which gives us x=3 for the index 13, which is the square located at the coordinates x:1, ...
20
votes
5answers
5k views

Why is an engine like Unity3D emphasized over a native library like OpenGL for beginners?

I am just a beginner in 3D games, my preferred platform is Android. I posted a question in some other forum about "What to use: OpenGL or Unity3d?" They all emphasized Unity3D and using its built-in ...