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)

1
vote
1answer
158 views

How do I quantify the curvature of a touch swipe?

I'm implementing a touch controller for my game. I am attempting to imitate Tiki Taka Soccer's "ball shooting" controls (gameplay video), where the curvature of the player's swipe affects the curve ...
3
votes
1answer
96 views

(2D) Take player speed into account while shooting bullets

In my top down 2D game, there is a plane as shown below: The plane shoots bullets forward. For firing bullets, I use: obj.GetComponent<Rigidbody2D>().AddForce(transform.up*500); However, ...
2
votes
2answers
117 views

Most efficient way to get the world position of the 8 vertexes of a Box Collider (C#)

What I am looking for is the most efficient way to get the world position of the 8 vertexes of the Box Collider of a freely rotated Gameobject. I cannot use collider.bounds since object is rotated, ...
1
vote
0answers
53 views

Trouble creating fog and lighting in unity

I am trying to create a model in unity that looks like this picture by Escher I can create the lattice, however, I can not create the fog and background/lighting effect. When I adjust the fog in ...
1
vote
0answers
50 views

Unity based washing/ cleaning game advice

I'm thinking about a way I can create a washing/ cleaning game as part of a project I'm working on within Unity, but given my lack of experience, I'm having trouble knowing where to start. The goal ...
3
votes
1answer
168 views

How can use a 3D map with 2D characters (Unity)? [closed]

I tried to search something about it but I can't find any complete or well-explained tutorials about how to use a 3D map with 2D characters and items, like Ragnarok or Final Fantasy Tactics. If there ...
1
vote
0answers
34 views

Why doesn't my script work in iPhone? [closed]

I have a script for registration and login, it works fine with Android, but with the iPhone app, the buttons work, but the script does not work, what can be wrong? Here is the script: using ...
1
vote
1answer
105 views

Unity + Texturepacker: Pivot point in weird positions

When my designer sends me the spritesheets done with Texturepacker and I open them with the Sprite editor, i notice that the pivot point is in extremely weird positions. Way above the spritebox that ...
3
votes
1answer
830 views

Vuforia AR/VR sample with Google Cardboard SDK: I cannot switch from augmented reality to virtual reality

I have followed the Integrating Cardboard to the AR/VR Sample latest tutorial. I have configured the provided scene sample according to that tutorial. I have compiled it to Android without any ...
1
vote
2answers
47 views

(2D) Simple AI is not working when Object pooling is used

I am building a top down 2D plane game for practice. Here, enemy has an AI script attached. AI script does the following : Determine whether the object is spawned to the left or right of screen. If ...
1
vote
2answers
88 views

Unity doesn't show always the score

I don't know if this issue is in Unity or in my script, the score work well in scoreText, but in the scorePanel its show before last score like it showing 1 rather than 2; the issue doesn't always ...
1
vote
1answer
46 views

Concerns about APK version compatibility

I'm making a game in Unity, and i want to know if I generate the apk in version 4.1 Jelly Bean he will run in newest versions of android? Can anyone explain me better how the version works?
1
vote
1answer
64 views

2DRaycast is shooting slightly in wrong directions

I wanted just a simple 2DRaycast, which points from my character to my mousePointer. So I found the following code in the Internet, most people seem to use it like that. So I tried it, but it isn't ...
2
votes
2answers
127 views

preventing a camera from getting stuck inside a mesh in Unity

I've a 3rd person camera similar to Mario64. Currently, I'm working on preventing the camera from getting stuck inside a mesh. The goal is to move the camera overhead. This much trickier than I'd ...
1
vote
1answer
261 views

Why is Raycast hitting masked layer?

Many questions have been posted on this topic but I'm facing a weird behavior which I could not find an explaination for. I perform a raycast giving it a LayerMask parameter which is defined as ...
2
votes
2answers
572 views

Unity 2D Alpha cutout layer for Sprites

I'm trying to make a simple Fog of War effect for my 2d game, similar to these: . I want to have a sprite layer of black and then have a sprite to cut out itself from the black layer, leaving a ...
2
votes
2answers
286 views

How to fix flare in unity?

I have a simple sun flare that I would like to appear on my directional light (sun). However I cannot see the flare, I have tried setting the ignore layers to everything and checked and double checked ...
1
vote
0answers
106 views

Symbol not found Error in Unity3d - IOS Buid in Xcode

I new to IOS build , when i try to build following error showing I using Unity 5.2.1f1 and Xcode 7.0.1(7A1001) . Previous unity version was 5.0.1 , in that version , same error was found thats ...
2
votes
1answer
289 views

Good practice in implementing multi sprite (as skins) in 2d unity game

so, I want to make such functionality in my 2d game with unity : Multi skin character, with similar control and functionality, and with possible different gimmicks (such as crossy road's ...
1
vote
1answer
35 views

Texturing in blender

I am texturing a tree in bender using the sappling add-on, when i put the tree bark texture (which is saved as .jpg) the texture looks stretched and wierd, ive used "Use UV for mapping" on the curve ...
1
vote
1answer
103 views

Best practice for implementing overall / weekly / daily highscores?

So I'm setting up social leaderboards and I want there to be daily weekly overall high scores. The way the scoring works is each score is tied to a user after the user logs in so the scores need to ...
0
votes
1answer
27 views

Duplicating and adding sprites at runtime in Unity

I am trying to create a 2D game in Unity in which objects keep falling from top and the player has to dodge them. Suppose I have created a sprite which serves as a single enemy that the player has to ...
1
vote
1answer
156 views

Unity UI Button not working on PC build but working on Android mobile build

I am using Unity to build a game that is going to be used on PC and on mobile devices also. The problem I have is that when I use Unity UI Button, on mobile (android) is working perfectly but on PC ...
0
votes
1answer
45 views

Unity>How to make a Box Collider( or any other collider) fits the gameObject perfectly?

I have downloaded and imported the Robot Kyle model in Unity 3D...and the problem with me is I want to add a Box or Capsule Collider to it...but I can't fit it perfectly... So what shall I do?
3
votes
1answer
137 views

Distance travelled by gameObject and behavior depend on device's performance?

The distance travelled by my gameObject and behavior depend on my device's performance. If the device is slow for example, it takes longer to accomplish a specific task, thus travels at a smaller ...
2
votes
1answer
103 views

'Ball.rigidbody' hides inherited member 'Component.Rigidbody'

I have some understanding of c# and I am new to unity. I am currently making a 3D project which use the Rigidbody component on the ball object. When I use following code: public class Ball : ...
1
vote
0answers
386 views

Failed to spawn server object, Unity UNET

I'm familiar with Unity and programming but I'm new to this site. So I have an issue with clients on Unity. I start servers with no errors, flawless. But when I join a server as a client I get a ...
0
votes
0answers
42 views

Unity3d impossible to open / create project

i'm experience some trouble with the linux build of Unity3d. I suspect that my Nvidia driver give me some conflict, but i'm really not sure of this, so i'm asking: this is the error that i get in ...
0
votes
2answers
100 views

Optimal way to find point D that lays at the perpendicular line between point A and line BC

I am trying to write a script in C# to find the position of point D in 2D space in a specific scenario. I know the (X,Y) position of point A, which never happens to be on the line that contains the ...
7
votes
2answers
769 views

Pointers in C# Unity

Hey I've just learned about pointers recently and am wondering how I can use them in c# (I just learned about them in c++) in unity. I do have some questions though. Pointers use low level ...
1
vote
0answers
353 views

Using unity app how to read the asset in android SDCard?

I am trying to read one file from my android sd card from my unity application, but its not reading. using the asset bundle i have exported my file and kept in my android device sd card and i am ...
1
vote
1answer
70 views

Unity3D - leaving and then returning to a scene

Effectively, I need to know how to run a mini game and then return to a scene. I know about DontDestroyOnLoad (this); but that works for game objects only and doesn’t do what I need - also because ...
0
votes
2answers
271 views

Unity FP Character Can't Look Vertically

I have a FP Character and well, it can't look vertically. Its happened about 3 times now, each time I just replaced it with the standard assets prefab, first few times it worked fine, but then after a ...
0
votes
1answer
814 views

Unity 5 C# - onClick.AddListener in a foreach loop using lambda expressions

I'm trying to dynamically create Unity 5 UI buttons that each set a global variable decision_id to a different value when clicked. The problem I'm having with this implementation is that they all ...
0
votes
0answers
74 views

Unity - The Animation State Machine doesnt appear for Animation Overrides

I have a small state machine for the animations of the player. The foes that the player meet use the exact same state machine, so I just created an Animator Override Controller for the foes, ...
1
vote
0answers
578 views

Colliding without physics in Unity: is it possible to put OnTriggerEnter in the moving character?

My main question is: is it possible to put OnTriggerEnter in a script that goes attached to the moving character instead of to trigger area/object? Let me explain my exact need. I want to detect the ...
5
votes
1answer
143 views

In Unity, how can I cause something to happen on a specific frame of an animation?

I have a GameObject "enemy" with an Animator and several states, like "idle", "walk", and "attack". I want to activate the "hitbox" when an animation "attack" starts. The problems is that the sword ...
1
vote
0answers
38 views

3D model exported from Maya behaving weirdly

I have some 3-4 3D character models which are claimed to be exported with the same configuration from Maya by the 3d designers. Now, some of the models(animations) is working fine in Humanoid settings ...
1
vote
1answer
96 views

Transform.LookAt rotates the sprite and collision not triggering

I've applied the below script to a gun object to instantiate bullets to the direction of the mouse position. The bullet collision is not getting triggered since the bullet has been rotated. How to ...
-2
votes
2answers
288 views

How can I make 2D games like shovel knight? [closed]

To make 2D games like shovel knight, do I need specific software? Would this be possible to achieve in Unity or would I have to use something else?
1
vote
0answers
36 views

Drag and Flick Objects to any position (Unity3D)

In unity, I have several boxes in one cluster. I want the user to be able to move any of these boxes to any position that they desire in the app, and have it stay there until they move it again. Also, ...
0
votes
1answer
48 views

What determines the hit detection ordering for graphic elements in Unity (2d game)?

I have a bunch of overlapping buttons spread across several UI Canvases. The default mouse behaviour only registers hover/click events with one of the overlapping buttons, which is ideal for my ...
1
vote
0answers
67 views

Selecting Dictionary item based on custom classes instead of keys

I am attempting to write my own path finding code for a game I'm working on that will implement a form of the A* algorithm. I store my nodes of the path finding system as a class called nodes and add ...
1
vote
1answer
124 views

Unity3D - generating a set of rooms (scenes) and saving them

I'm having a problem wrapping my head around scenario like this. Say I've got a scene called Room. Now, my game procedurally generates content of each room. Entering a new room to see new content, ...
7
votes
2answers
227 views

How do I create a draggable object which snaps to obstacles in the way?

I bring yet-another-drag-with-mouse question (I am using Unity with C#), but with a less common particular detail: the existence of obstacles in the middle of the way trough which dragging occurs (3D ...
-1
votes
4answers
153 views

How do I implement an item that can hold other items?

I'm attempting to implement a "storage item" into my game. But I'm having trouble planning out how it would work. I already have an inventory system made, but this storage item is giving me trouble. ...
0
votes
0answers
40 views

Unity Parallax Strange Effect

I follow this Parallaxing Tutorial: https://www.youtube.com/watch?v=5E5_Fquw7BM for create a Parallax in Unity. I created a custom Script for my GameObjects like this (EDIT: this is in the Update ...
0
votes
0answers
148 views

Arm Inverse Kinematics to Hold Gun

I am trying to make IK to hold a gun, but hand is not rotating in the right way it always rotate weirdly. Here is my code hand.rotation = target.rotation; hand.position = lowerArm.position; ...
1
vote
3answers
390 views

Unity C# - Raycasts, How to Ignore Triggers?

Let's say I have a Raycast, but I don't want it to collide with any triggers. I don't want to change the Project settings since that's a little inflexible. How can I have a Raycast ignore any ...
1
vote
3answers
128 views

What's the most efficient way to find the position of a point in relation to corners of a rectangle despite rectangle's scale

I am struggling to achieve the following with C# (in Unity). I need to find the position of the points that lay at a given distance (let's say 1m) from the corners of a rectangle, in a way that the ...