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)

0
votes
0answers
12 views

How do I invert the direction a cylinder is pointing?

I found this code to draw a line between two mouse points. I want to do the same, but inverted; going in the other direction. The line should get larger from my first point toward the second. None ...
0
votes
1answer
30 views

How to combine the camera that follows the player and the camera shake effect in Unity?

I need to combine both camera that follows the player and the camera shake effect in the same moment. The problem is in that, if I make the shake effect for the camera, then the camera doesn't follow ...
0
votes
1answer
78 views

Doing imagemagick like stuff in Unity (using a mask to edit a texture)

There is this tutorial in imagemagick http://www.imagemagick.org/Usage/masking/#masks I was wondering if there was some way to mimic the behavior (like cutting the image up based on a black image ...
1
vote
1answer
202 views

Long delays in Unity3D substance generation

Currently working on an iOS/Android project in Unity3d, and we're seeing some incredibly long times for generating substances between testing runs. We can run the game, but once we shut down the ...
6
votes
0answers
153 views

Unity: Why do my normals flip during an animation?

This problem boggles my mind. I have an animation running on a face object (imported from Blender). At a few points in the animation, the normals switch direction! It causes the mesh to blink. Of ...
2
votes
2answers
84 views

Calculating gameObjects hit by a directional light source

I am trying to figure out in my current game whether a gameObject is lit by a directional light or not. Below is my image inside the Unity game engine As my game runs around a Day/Night cycle, I ...
0
votes
1answer
101 views

touch in guiTexture

Before time in my game start. i want there will show a guiTexture.. if i touch this guiTexture, that will hidden and the time game will start. I try to make a script but it doesn't work. I'm a bit ...
0
votes
0answers
25 views

Unity 4.6 GUI causing issue [on hold]

I am in a trouble. I have a Unity 4.6 button that is the child of an Image object. The button changes it's position and sets on the center whatever anchoring mode I use. The Tragic thing is that When ...
0
votes
3answers
109 views

Unrealistic sphere behavior on inclined plane

I am trying to model a ball rolling down an inclined surface in Unity based on what I am observing in real life but it is still quite off. In Unity it takes the ball about 3 seconds to travel from a ...
0
votes
1answer
66 views

Alternative to Update()

Here is my noobish scenario I'm trying to understand: Some class, Terrain: void Start() { ... switch (Type) { case TerrainType.StartPoint: ...
2
votes
1answer
52 views

How can I access a script variable from another script in Unity?

I'm creating a space shooter (think Space Invaders or Galaga) where the GameManager persists between scenes but the player and enemies don't. I need to access a boolean value from the player and ...
0
votes
0answers
11 views

How can you duplicat folders and not share old dependencies in Unity?

I have a folder with some prefabs, materials, textures, FBX, etc. My Prefabs refers to FBXs and Materials in this folder. Can I clone this folder in a way that it will save those local dependencies? ...
0
votes
2answers
74 views

Unity yield WaitForSeconds() not working

I am new to Unity development. I started learning Unity by reading tutorials, demos, examples, and watching videos. And I am having some trouble with using this timer. Here is my code: void ...
0
votes
1answer
51 views

Can't go above max speed with RigidBody2D.AddForce()

I'm having trouble making a character move faster than a certain limit using RigidBody2D.AddForce(). My game is a top-down 2D game (constrained to the x/y plane). I'm using a float 'MovementSpeed' to ...
0
votes
0answers
34 views

Suggestions for porting games to a very low-rez screen [on hold]

I'm working on a project where we have access to a big, very low-resolution screen. The screen is about three feet (1m) wide and eight feet (2.5m) tall. Its resolution is 24 pixels wide by 56 pixels ...
0
votes
0answers
28 views

Create a sprite in Unity that has a border that does not change its width when scaling

I am trying to create a box that has a 10 pixel border and when I scale that box I would like the border to stay 10 pixels no matter the size. I am currently trying to create an empty game object ...
0
votes
2answers
272 views

Unity3d and Windows 8 run game in frame

How do I set Unity3D to run my game on Windows 8 in a fixed size frame (with a border around it) and not in fullscreen? I tried setting this in the Unity script and in the final C# project, but ...
0
votes
1answer
140 views

Unity mouse input not working in webplayer build

I have a button script with the following code void OnMouseDown() { animation.Play("button-squish"); enlarged = true; audio.PlayOneShot(buttonSound); } void OnMouseUpAsButton() { if ...
1
vote
1answer
141 views

How to draw a specific GameObject into RenderTexture in unity?

To apply my effect, I should draw only several specific objects into a RenderTexture, with their material, and then use the RenderTexture as a texture for an another object. I think ...
0
votes
1answer
700 views

Slope polygon collider 2D causing box collider 2D to 'bump' while sliding on it

I'm doing procedural terrain generation. So far I've created the mesh, and attached a 2D polygon collider to it. The terrain is made up of hills going up and down. After doing so, I put a 2D rigid ...
-1
votes
0answers
21 views

perpendicular planes are too lighted [on hold]

I have this problem with Unity. From some days I have the free version of Unity and this issue happened. When I look the floor or a wall, I see a lot of reflection light. It seems that there is a ...
-4
votes
1answer
58 views

Move an object based on XML/TXT file [on hold]

Let's think I have an file which looks like this: 0 1 2 3 4 5 6 7 8 9 10 11 I want to create a move from this file. For every 1s(mentioned in the file) I want to move the object. Is this ...
1
vote
2answers
83 views

control animation using animator control class

I did a sample existing code to control animation using animation.I dragged and dropped a character into the scene then I added a Animator to it and added the animator controller.Below I have given ...
0
votes
2answers
95 views

I want to show total time spent by all players around the world in my game

I am developing a Unity3D game. I want to show in my game: Total time spent playing all time by all players around the world Total time spent playing in last 24 hours by all players around the world ...
2
votes
1answer
79 views

How to share values between different shader programs?

I am using Unity but this might concerns all type of shaders. I would like to know if this is possible to share values between different shader pass.Let's imagine that I am computing something in the ...
2
votes
1answer
139 views

How to impale and stack targets correctly according to the collider and its coordinate?

I'm making another simple game, a catch game, where a spawning target game object must be captured using a skewer to impale it. Here how: At the start, the falling object (in red) will fall in a ...
0
votes
0answers
29 views

Share image on selected media [on hold]

I want to share image on selected media that I capture through code. At present I have following code to capture image private void CaptureScreenShot() { Texture2D tex = new ...
1
vote
1answer
694 views

Unity Frustum Culling Issue

I'm creating a game that utilizes off center projection. I've got my game set up in a CAVE being rendered in a cluster, over 8 PC's with 4 of these PC's being used for each eye (this creates a ...
0
votes
0answers
63 views

Creating a arc path connecting two GameObjects in Unity

I am working on a game on a spherical surface which first of all is a big challenge in itself. I want to create a path on an arc which connects two points ( seen in the image ) and show an arc path ...
2
votes
2answers
510 views

How to simulate wind in 2D

for a 2D scenario, I wanted to have a fan blow at an object and make it move with the "wind", how can I simulate the wind under these circumstances?
0
votes
0answers
43 views

Is this shader too complicated for mobile? Renders solid black on mobile [closed]

I've written this for use in Unity with ShaderForge and have attempted to use it on Mobile, however it is rendering solid black. http://pastebin.com/5kitbRAg It is quite complicated, as it's a splat ...
9
votes
5answers
1k views

How do you handle aspect ratio differences with Unity 2D?

I've gotten a lot of answers to this question, but they are all generic and generally not very useful. None of the tutorials talk about aspect ratio and dealing with mobile devices and there are a ...
0
votes
2answers
80 views

animation control problem

I have a list of .FBX object.When I drag that .FBX into scene its corresponding inspector Animation component(fig 1) appears but when I drag some other .FBX object into the scene the Animator ...
0
votes
0answers
27 views

Push Notification to start a scene

I was wondering whether I can use APNs in iOS to trigger an event in my game, like start a scene without user clicking the notification. Is it possible to use remote push notifications for events like ...
5
votes
1answer
466 views

Unity3D - How to tessellate 2D sprites?

I use dynamic vertex lighting on 2D sprites. On larger sprites the lighting is uglier than on smaller ones. This is because every sprite is just a quad of two triangles. Not enough vertices there for ...
0
votes
1answer
52 views

How to render the sprites for a 2D soft body physics system

This is not a question as to how to achieve soft body physics, but rather if I have a mass-spring system how to modify a sprite with that information. I am using unity so I dont have access to vector ...
0
votes
0answers
28 views

Printing the values from the corresponding array [migrated]

Suppose 1 A 2 B 3 C I need to print the value corresponding to 1-> A I have put both in two array d1[1,2,3] s1[A,B,C] Now i need to print the value in the form shown in the above d1[0] ...
1
vote
1answer
76 views

Correct multiplication order for a 2D Matrix

I'm currently trying to create a camera and entity/model matrix for my 2D game similar to that of Unity3D. I've already tried to find answers to this question on stackoverflow/gamedev but i couldn't ...
0
votes
0answers
35 views

How to move rigidbody player to its facing direction with AddForce?

How can I move a rigidbody to its facing direction? I've already tried this: rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration); // v is a public float which gets a new value in ...
0
votes
1answer
135 views

Generating a particle effect on top of a GUIElement (Unity)

I am working in Unity on a 2D project which is using C#. I have a number of guitextures which are hearts in order to create a sort of life meter. I would like when the player loses a heart for the ...
1
vote
4answers
110 views

How to read a data from text file in unity

Can anybody help me out with giving the steps needed for reading data from the text file in unity and how can the script be added.
0
votes
2answers
165 views

Simultaneous Animation for a GameObject - Unity3D

Its my second week with Unity. I am doing a 2D game and I have a small GameObject which should change its sprite along with following a definite path defined in Animation Curves. I did both of them ...
0
votes
1answer
241 views

Unity Gui from text file templates

I've been banging my head against a wall this past while over how I might create menu's and menu components in unity from text file. I would normally just build my own extended panel/label classes etc ...
0
votes
1answer
59 views

How can I inspect 3D model exactness? [on hold]

I am neither a game designer nor a graphic designer. I am a .Net and C# software developer. I have a game project and I've still been studying to learn game concepts and technolgies for a year. ...
2
votes
3answers
138 views

How do I check whether a camera has unobstructed view of a GameObject?

I want to check if a GameObject is visible to the camera. The renderer.isVisible-method only checks if the camera is turned towards the object, not if there is anything between them (like a wall). ...
0
votes
1answer
43 views

Calculate needed speed and object's position in Unity3d

So i'm trying to calculate object's future position so my enemy can land to it safely. Idea is that using future postion I can calculate angle and convert it to direction vector and also using ...
0
votes
1answer
34 views

Using IPAD's as controllers for a Unity game

We are making a Multiplayer game using Unity. The actual game would be run from a PC projected on a screen and the players would be using their respective Ipad as a controller to play the game. I am ...
1
vote
1answer
78 views

Usage of math.Atan2 in a 3D coordinate system with Unity

I have a simple question on usage of math.Atan2 function with Unity in a 3D environment. I found this code on Unity's documentation for Math.Atan2. I changed it a bit to fit my needs. Vector3 ...
0
votes
1answer
86 views

2D object grids to a dictionary

I'm pretty new to Unity and trying to figure out what a good way of transferring objects in a grid to a dictionary would be. For example, if i have a grid of 2D objects (squares) such as below ...
0
votes
2answers
355 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly affected on the Y axis and hardly at all on the x axis. I don't ...