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 (2)

0
votes
1answer
27 views

Animation inside a .obj file?

Ok, so yesterday I understood that "rigging (bone and joints)" are things that are use inside a 3D animation software like maya. By that I mean that those bones and joints are not inside the .obj file ...
3
votes
1answer
34 views

In Unity, how can I get trigger enter/exit every frame when I change Time.timeScale?

In my game I have a power-up that slows everything down. I keep the player at regular speed by dividing deltaTime by timeScale. Everything works perfectly except for OnTriggerStay2D which appears to ...
3
votes
2answers
395 views

What revenue cuts will I take by using Unity combined with Facebook's platform?

Basically me and a friend want to develop a Facebook game by using Unity. What I wanted to know is if we do earn any money on it, how would we be required to use the profits of said money? I remember ...
0
votes
0answers
41 views

How to use touch.deltaPosition properly?

I use following code for measure touch delata position: private Touch firstDetectedTouch; public Vector3 dragDistance; void Update() { if (Input.touchCount > 0) { ...
0
votes
0answers
13 views

How do I add EventTriggers to Multiple instantiated prefabs from a list?

I have a prefab which I am spawning a dynamic amount of. I want to attach an event trigger to each one of them, on pointerclick, to call a method accepting an int as parameter. I have the following ...
1
vote
1answer
35 views

World Space canvas rendering in front of line mesh

I'm attempting to attach a pointer to my steamvr controller to simplify world interactions. I'm very new to unity, but found a nice volumetric line asset (VolumetricLines) that aesthetically is ...
1
vote
1answer
44 views

How to animate material change to get a status bard effect, in unity

Imagine a long cube, like a bar, that has a dark material, and you want to animate changing its material to a light material, but do it gradually from one end to the other, like filling up a tube, or ...
0
votes
0answers
31 views

Unity 2d variable has not been assigned when trying to instantiate

So I have some code here: using UnityEngine; using System.Collections; public class boardManager : MonoBehaviour { public GameObject GrassTile; void Start() { for (int i = 0; i <...
1
vote
1answer
58 views

Should camera rotation be framerate independent?

I currently have my own custom first person controller, and the code to rotate the camera and controller based on the mouse position deltas looks like this: public void ApplyRotation() { this....
0
votes
0answers
15 views

Moving parts of animated mesh by code

I have a skeletal animated GameObject consisting of multiple meshes. Now one of the meshes rotation should be controlled by code. How can i do this in unity? Imagine a human head with a lot of ...
0
votes
1answer
98 views

How to keep a rigidbody on the ground going up/down a slope? (Unity 2D)

I'm not sure if this is possible, but Im working a 2D project to has randomly generated loops (imagine a sin or cos graph). I have a 2D character (a quad for now). I want my character want to ski a ...
0
votes
0answers
25 views

Get relative angle to collision Unity

I want to get the angle between the rotation (euler Angles) of the camera (V1 : Vector3) and the collision point of my character, when it hits a wall, to determin, if it was left, right, or in front ...
0
votes
3answers
37 views

Unity - Accessing a UI's text through a Transform

I have this in my player's component list. The HungerTarget transform is the text box in the UI canvas. How would I change the UI's text here? using UnityEngine; using System.Collections; public ...
0
votes
1answer
41 views

WebGL Redirecting URL

If player's browser don't support WebGL, I want to redirect Web Player version. I think it's possible in UnityLoader.js file but how? function CompatibilityCheck(){hasWebGL?mobile?confirm("Please ...
1
vote
1answer
29 views

KeyCode dictionary in Unity

I found a strange problem while programming keyboard input in Unity (v5.3.5). public class AvatarInputMapperUnityContext : MonoBehaviour { private AvatarController _avatarController; public ...
0
votes
1answer
10 views

Altering Physics Property of a Shape in Unity

I want to create say 4 blocks, and each block will dictate how e.g. the bounciness of an object landing on it will behave. So if the block is made of sand, I don't want bounciness, if the block is ...
0
votes
1answer
101 views

How to achieve 2D ski movements similar to Alto Adventure?

I'm trying to achieve 2d movement similar to Alto's Adventure with Unity 2D. When grounded I want the character to slide alone the terrain parallel to the slope, but I want to be able to freely rotate ...
0
votes
3answers
64 views

How to get “this” object collider name, when OnTriggerEnter is fired ?

I have a "car" object with 2 collider attached, a base and a top collider. Then i have a script attached to my car. I'm using OnTriggerEnter event to detect collision with an invisible "Checkpoint". ...
0
votes
1answer
37 views

Unity: How to transition to a different animation during the blend phase?

I have a set of animations: Idle, start walking, stop walking, and walking full speed. I have the animations all blending nicely...and the controls are fairly responsive during most of the motion......
0
votes
0answers
28 views

Unity3d how to correctly using tilesets

currently I am using external tilesets like this: Load texture from file to Texture2D Texture2D tx2 = new Texture2D(2, 2); tx2.filterMode = FilterMode.Point; tx2.wrapMode = TextureWrapMode.Clamp; ...
0
votes
0answers
19 views

How to model muscle contraction force acting on two bones connected by joint in Unity/PhysX?

I'm trying to understand what is a correct way to model a muscle contraction in a physics engine like PhysX (Unity3D). Muscle that I'm modelling is connected to a bones in 2 points A and B. Having a ...
0
votes
1answer
33 views

Unity 5 - Importing models with multitextured materials

I have a file Blender model of a tree. It consists of some branches and lots foliage, nothing unusual. The foliage consists of a single material, which consists of 2 textures, a diffuse and lower ...
0
votes
0answers
26 views

Is it possible to stream the webcam via Unet (Unity Networking)

I've got my webcam on an ImageTexture in my Scene (with Vuforia), but now I'm struggling and I'm not sure whether it is possible to stream this picture to other players in the Multiplayer "game". I ...
0
votes
1answer
32 views

Behaviour tree editor Unity

I'm a programmer, so I am perfectly aware of how to implement a behaviour tree. I don't want to rely on third party tools, but still have convenient tools for creating the AI for my game. I was ...
0
votes
1answer
29 views

Mesh Chunk Combining and Extruding

So I'm working on a proceduraly generated level, that is composed of multiple chunks, so you don't go over the maximum amount of verts allowed in Unity Meshes. Another function is the ability to ...
0
votes
1answer
30 views

Unity: Animation With Motion Now running in place

I am new to unity. I am trying to assemble a character that walks forward, stops, and walks forward again when I maneuver the joystick (ps4 controller) accordingly. I have the whole thing pretty ...
0
votes
1answer
45 views

Calculating required force for pushing a body to a desired position at once in Unity [duplicate]

In a 3D world I simulate that a coin is being pushed over a plane (applying a force in his rigidbody where y-axis = 0) using a top-down view. Some time ago but using Box2D, I was able to calculate ...
1
vote
2answers
150 views

How can I create a custom PropertyDrawer for my Point struct?

I created a Point struct: [System.Serializable] public struct Point { public int x; public int y; } I am trying to create a property drawer for it, so that when it shows in the inspector, ...
1
vote
2answers
58 views

How to create a repeating gif style imagery for a game tutorial dialog

I want to create a gif style video that shows up in a tutorial window using Unity. How can I make this? Do I record the thing I want to show and then put it in a texture? Example:
1
vote
0answers
51 views

How to reset RectTransform's position?

So, I am trying to make a simple GUI Instantiate system. The GUI is going to spawn successfully, but the position is wrong. Position : (Left, Right: 249.8423 ; Top, Bottom : 400) Anchors : (Min: X:...
-1
votes
2answers
88 views

Why doesn't Unity keep keydown states between scenes, and how can I change that?

So basically, when my scene in Unity changes and I'm holding down, say, Right or Left, when the scene resets, my player (and Unity) doesn't even recognize that I'm still holding that button, until I ...
0
votes
1answer
28 views

Changing Force of my fall after a jump

I'm trying to change the speed of the jump. I noticed if I jump twice the fall speed force gets implemented. Otherwise it is unchanged. If I try to change my onGround to be else false it remains ...
17
votes
2answers
3k views

Player jittering against wall when held down button

So, I'm making a top down RPG. Everything's going excellent, but this problem is quite annoying. Now, when the character moves against the wall, the player jitters back and forth. I'm guessing it's ...
-1
votes
1answer
100 views

Why I can't do a build for Linux?

I'm using Unity 5.3.x (free version) on a Windows machine. I would like to build my simple desktop game either for Windows and Linux, but Linux (and Mac) build is disabled. Am i missing something ? ...
1
vote
2answers
83 views

How to use touch screen for movement instead of keyboard narrow keys

I wrote this code and run the game on my desktop, now I need to build this game for android and I need to change to touch to move the player, what it should be changed in the following code and what ...
-1
votes
1answer
49 views

Is there a way to have an ai characters ask my questions so that a player can choose, leading to different story lines?

Character asks "Do you choose A or B?". Player chooses "B" . Story line changes based exclusively on the conversation.
-1
votes
1answer
43 views

How to give a mesh collider gravity 5.0

I was trying to make a simulation of an object that needs gravity to work, a hydraulic movement-assistance system for disabled people. All parts are aligned properly, all objects have mesh colliders ...
0
votes
2answers
53 views

How can I change my script execution order programmatically?

I have a script that I want to run before any other script. I want to change its execution order settings. I could do that using the Script Execution Order Settings option from within Unity, but I ...
0
votes
0answers
38 views

YouTube asset for unity does not support audio for videos with resolution more than 720P

https://www.assetstore.unity3d.com/en/#!/content/29704 I purchased this asset for unity from asset store in order to play 360 degree videos in unity . However it does not support audio for videos ...
1
vote
2answers
80 views

Unity UI-Animations possibilities

I'm doing some stuff with UI-Animations the past days, but I never figured out, whether it is possible to do stuff like this with Unity : https://d13yacurqjgara.cloudfront.net/users/107759/screenshots/...
0
votes
0answers
31 views

Paint a 3D object partially and get percentage of a color in Unity 5 and C#

Im trying to paint an object partially from a raycasthit so it looks partially painted like in Splatoon or e.g. Is there a way to get this working in 3d, without creating a new gameobject everytime? ...
4
votes
1answer
166 views

Is it cheaper to let each tile have its own collision?

I'm just now playing around with Tiled, and I think this is the way I'm going to go to create tilesets for my game maps, but I'm curious about the cost (memory/CPU) difference between setting a ...
0
votes
1answer
43 views

How to set only one collider with OnCollisionEnter(Collision col) in Unity?

I tried with this: void OnCollisionEnter(Collision col) { Debug.Log("hit everything"); if (col.gameObject.layer != LayerMask.NameToLayer("bico")) { if (col.gameObject.tag == "...
-1
votes
1answer
67 views

Increment int in array - int i is out of scope? [closed]

This is my scenario: I have a 3D model of a house, and an autonomously moving robot moving through the house picking up multiple objects. I have an array of 3 objects I want it to pick up, but I don'...
0
votes
2answers
54 views

What Collider should I use for my Player object?

I am making a 3rd person game with a simple orbit cam and it works fine most of the time, but since I have a box collider and I walk across an uneven surface, the player tends to tip over. How should ...
0
votes
1answer
32 views

Moving autonomous robot form one location to another based on array

I have a 3D model of a house, and I want an autonomous robot to move from 1 object in this house to the next one. I have it moving to the first, but it won't move to the second one. This is my code: ...
0
votes
2answers
33 views

Is There a Way To Keep Precision When Transforming GameObjects

I've seen this issue before, but it's never been a particular issue for me until today. I have each "room" of a dungeon created with a class script that contains details of that room. During the ...
0
votes
2answers
37 views

Autonomous robot - moving from 1 object to the next object

This question falls in line with my last question: Unity 3D - create autonomous moving robot in house + first person camera movement What I have I have a 3D model of a house; a first-person camera ...
0
votes
1answer
13 views

Drag event inverts in landscape mode

I am developing an car game for android with an UI steering wheel to control the car. I'm following Answer example for the wheel rotation. This is the code to rotate the wheel. rectT....
1
vote
1answer
32 views

Unwanted highlight on far side of objects near the edges of the screen when using orthographic camera

I was creating a simple unity game with a sphere as a ball. The problem is that the ball face towards the camera origin renders material correctly but the one away from camera does not. The ball has ...