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
49 views

In unity, how do I rotate a vector in relation to the player?

I am making a radar script in a unity FPS game project I am making for class. I already have a working example of a radar script that works in relation to the player's position. However the rotation ...
1
vote
0answers
194 views

Water drops on camera

How can I create water drops on camera something like we see in Ripitude GP, I tried using Unity's default GlassStainedBumpDistort shader though its performance heavy on mobile plus it do not let ...
2
votes
1answer
179 views

Unity2D 5 - Flickering sprites on Android

So the game had been working fine for a few days on Android phone without any issues. Today, after adding some scripts and tweaking the game a little bit (tweaks which have nothing to do with the ...
2
votes
1answer
143 views

Using XBox 360 controller in Unity game - game doesn't recognize axis movement

I have a problem with the usage of XBox controller in Unity game. I connected the controller to the PC and it works fine, I also managed to use it in the game itself - I'm using "A" button to fire and ...
3
votes
1answer
47 views

Do I have to resize and manually move the checkbox with a Unity Toggle?

I have a Toggle UI element (the stock one from Unity 5.2), and when I resize it to make the text legible, the checkbox doesn't resize or move: Am I missing something, or is the control ...
1
vote
1answer
105 views

Transformation by right vector using TransformPoint return an identical position

I think the following code should work. I'm trying to set the position of a GameObject where the pointer currently is, I mean, where the player is looking currently: public void SetTransform ...
1
vote
2answers
411 views

Set Parent to Instantiated Objects in Unity

i am having problem in attaching parent to the instantiated objects. I have attached the code below. please tell me where i am doing wrong. Thank you. public GameObject brick; public Transform ...
0
votes
3answers
78 views

WaitForSeconds isn't working

I have a class which is changing the player speed. Here is the code: using UnityEngine; using System.Collections; public class MultiplySpeed : MonoBehaviour { public int multiplier = 2; ...
0
votes
0answers
326 views

Unity - OnRenderImage hides UI

I have a component which renders a few different cameras and the images. However, this obscures my UI when in Screen Space - Overlay mode. I can put the canvas in WorldSpace mode, which works, but ...
0
votes
2answers
2k views

How to detect mouse over for UI image in Unity 5?

I have an image that I have setup to move around and zoom in and out from. The trouble is the zoom can be done from anywhere in the scene, but I only want it to zoom when the mouse is hovering over ...
1
vote
1answer
223 views

Snake game tail

I am working at a 2D Snake Game in Unity. This is the head of the Snake: http://i.imgur.com/RrKr9cg.png And this is the Extension of the tail of the snake. It is added everytime I eat something: ...
0
votes
0answers
64 views

State Machine help

I'm using a state machine for my enemy's AI. I've not worked with state machines before & followed Unity's live training on State Machines. I added a HitState to handle animation sequences. The ...
0
votes
2answers
210 views

2D animated sprite in 3d Game

I have a model created in Blender for a character with a sprite as a child of the character that I would like to animate. I'm making a turn based strategy game in which I would like to be able to ...
2
votes
0answers
89 views

Rotate perspective camera to align screen width to procedural object's width (Unity, C#)

I give up. After much trying and searching, I have to say I was unable to achieve the following task, for which I must call for your wise advice. In my current Unity 5 application (using C#), there ...
1
vote
1answer
405 views

Image target display in unity Vuforia

I am using unity 4.5.1f3 and using the Vuforia sdk 5.0.5.I have downloaded the sample project from the Vuforia site.When I tried to run the sample of Imagetarget project,it asked to add license ...
0
votes
1answer
215 views

Unity3d - Transform rotation(angle) help

Im trying to rotate an object 90 degrees to the left but instead of rotating straight left it rotates 270 degrees to the right. Here's the part of the code which controls the rotation: ...
1
vote
0answers
99 views

Bold black bar on right side of game in Unity (Android)

I am trying to create an endless runner. I have already created a system to generate infinite backgrounds from an array of some. However, on running the game, I get huge black bar on the right side of ...
2
votes
2answers
617 views

How to achieve lighting like this in Unity for 2D games?

How could I accomplish a lighting effect something similar to this game?: I'm not talking about the shadows but about the glowing/lighting effect on the crystals and the torches. Anyone got any ...
0
votes
0answers
40 views

NavMesh giving jerky like motion

I instantiate Gameobjects that have a NavMeshAgent attached to them. Their destination is the player that can move around a map, and there is a baked NavMesh on the map. The problem I'm having is ...
0
votes
2answers
2k views

Press button event instead of onClick() in Unity

I want to add a nitro in my arcade game and i want to detect press UI button instead of click. unfortunately only onClick() event is available for UI button what kind of options do I have ? Thank ...
16
votes
2answers
2k views

How to design context menus based on whatever the object is?

I'm looking for a solution for a "Right Click Options" behaviour. Basically any and every item in a game, when right clicked, can display a set of options based on whatever the object is. Right ...
-1
votes
1answer
411 views

MovieTexture error with augmented reality

Unity says, the following error, is this because I'm using a free Unity instead of pro ? The type or namespace name `MovieTexture' could not be found. Are you missing a using directive or an ...
0
votes
2answers
31 views

How to manage special state in mecanim?

I have a game in which there is a cat that has three states: On Ground, Going Up and Coming down. This is handled by having 3 states, up,ground and down. Now, there is an additional requirement that ...
1
vote
1answer
58 views

Camera rotation according to target direction

I am facing issue when camera is following to my target and target rotates to 90 degree or -90 degree than camera is not rotating.i want smooth rotation according to target when target is change the ...
1
vote
1answer
31 views

Adjust postion only in X axis

I have two game objects named A and B, just as follows: I want to move object B to this virtual line without any rotation so that the destination is B' . What I have are transformation of object A ...
4
votes
4answers
198 views

2D Animation based on Time.deltaTime has problems when the game performs long operations

I animate my 2D sprite using the Update() method: float timer = 0.0f; float delayPerFrame = 0.04f; void Update() { timer += Time.deltaTime; if (timer >= delayPerFrame) { timer = ...
0
votes
2answers
883 views

How to change alpha of a sprite through script in Unity

I have 4 buttons and they each flash when the button is pressed. However if you were to press a button, then while the button is darker (flashing) click another one, that button then stays dark. I ...
1
vote
1answer
193 views

Move collider along with model with Mecanim jump animation

I've been creating an infinite runner game in Unity3D for a while and I got stuck in this point that whenever my character jumps using Mecanim system his model (mesh) goes to air but his attached ...
2
votes
1answer
242 views

Unity + Oculus Rift - Setting field of view or rendering part of display

I need to render a small portion of the display to a texture. I found a script to simulate a scissor rect by modifying the projection matrix - Unity 5 doesn't seem to provide any out-of-the-box ...
0
votes
2answers
131 views

Problem with animations from Blender

I have a model that I made in Blender and also I have a gun reloading animation, the model has a rig. So it appears that the animation of the rigged model is devided into 25 different animations but ...
1
vote
1answer
523 views

Unity Texture2D raw data TextureFormat problem

I am trying to load raw image data into a Texture2D in Unity using LoadRawTextureData but I can't get it to work correctly. First I receive an array of bytes from an unmanaged function that captures ...
0
votes
0answers
54 views

How to change the Gameobject on a button click

Suppose I have a three gameobject(g1,g2,g3,g4,g5) and I have two button Next and previous.Suppose when i click on next button from g1 the object should move to g2,when i click on next button again it ...
1
vote
1answer
209 views

Unity Augmenter Reality on Android with Video playing

Hey sisters and brothers, So, I created an augmented reality marker, which works perfectly, I was able to display 3 shape on the screen with my Nexus 5. I would like to replace my shapes with a ...
3
votes
2answers
244 views

How to achieve a dynamic soft see-through hole effect in a wall with shaders?

I'm looking for a way to create a dynamic soft see-through hole effect for room walls. I know a few ways how to do it (for example multitexturing with second layer being the hole mask in screenspace), ...
0
votes
0answers
52 views

Unity 2D - GUI box not moving with game object on X axis

I am trying to create a health bar above a spaceship in a 2d spaceshooter. Right now I just need to create a box and move it with the player. I found WorldToScreenPoint() which should work althought ...
1
vote
2answers
450 views

Unity - Raycast not hitting to BoxCollider2D objects

I'm working on 2D and I have a Quad as background. And some wall sprites over this quad : I'm instantiating wall prefab sprites over quad when user click to somewhere. But I don't want to ...
0
votes
1answer
701 views

Unity3D - override main camera rendering for compositing effect

I'm fairly new to Unity and am having a bit of trouble understanding the rendering pipeline. I need to render the scene to four "windows," so that the viewport shows a 2x2 grid of the scene, each ...
0
votes
1answer
85 views

An Object is moving but its velocity is 0

In Unity 5 I have an object move when I press a button, force is added as seen by the code below. Then once this force is added I print out its velocity. The problem is that in the console my first ...
1
vote
0answers
82 views

How to make a part of an object with navmesh agent rotate separately?

I have a game object (a Humvee jeep) and it has a turret gun on top of it. What i want to do is while the vehicle is moving in a line the turret look at player. I tried rotating the turret gun with ...
0
votes
0answers
308 views

How to draw a screen aligned quad by command buffer in Unity deferred rendering

I want to draw a screen aligned quad by a command buffer, and add it at CameraEvent.BeforeLighting. I create a quad mesh in code, and I'm sure the mesh is right, because it works if the command ...
0
votes
1answer
86 views

Drawing Chess Board vs Using Picture

Would it be better to actually draw the board in a script and attach colliders to each piece or get a picture and add the colliders before the game starts? Is the difference in processing power ...
2
votes
1answer
113 views

Given a 3d goal point and a turn rate in radius, find max speed to reach goal

I'm working on a 3d space sim with AI agents flying ships through space. I am trying to get them to follow a waypoint path nicely, which involves figuring out how fast they can be travelling and still ...
1
vote
1answer
65 views

Changing the camera movement in unity

I have a code that allows me to move the camera on the x-axis. I need it to move on the y-axis as well as the x. using UnityEngine; using System.Collections; public class orbit : MonoBehaviour { ...
2
votes
3answers
224 views

How to create in game menu attached to unit

I'm creating a game similar to Banner Saga, except my game will be in 3D, with a camera that can move around and zoom in and out. What I want is for a menu to appear after the user clicks on a unit. ...
0
votes
1answer
317 views

How can I export a model from Unity to three.js?

I want to buy some assets from the Unity asset store and use them in my three.js project, but I am not sure what the best way to go about this is. Some cursory googling got me this, but Collada ...
-3
votes
1answer
50 views

In Unity how do i make the camera follow a character in the y axis..? [closed]

I have a character which keeps moving in the y-axis and the camera needs to be fixed to follow with the character for some extent and when the character falls down camera should freeze at the point. ...
0
votes
2answers
51 views

Limit the boundary of Touch

a game that I currently working on is in a way that player should actually draw a rainbow on the screen by tap and drag gesture in order to make a hills for the car. but the issue that i currently ...
0
votes
2answers
84 views

Create a custom shape from a basic shape

Is it possible to create a custom shape by modifying one of the regular 3D objects in Unity3D 5.1? For an example: Make a cone from cylinder.
0
votes
0answers
50 views

Unity Mechanim makes physics behave weirdly

I'm developing a 2D Wrestling game in Unity 5 build 5.1.2f1. It's just the beginning so the character only has a number of animation states and a rigidbody2d. This is the state machine and these are ...
0
votes
1answer
296 views

Click to move - get NavMesh layer

I'm using NavMesh, and NavMeshAgent for my character movement and Pathfinding. I made a testing NavMesh with 2 area layers: 0 = Walkable 3 = Water. In have a click to move script, and i need to ...