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)

2
votes
0answers
26 views

In Unity3D (and PhysX), how do I calculate the products of inertia?

Since unity3d uses physx underneath the surface, obviously they share the same features. One of the features is the moment of inertia tensor - Unity3D one, PhysX one. Though, they use the diagonal ...
0
votes
0answers
35 views

Can't drag image onto scene

First time trying Unity and I'm having trouble with importing assets. border_horizontal.png is fine, but I can't drag border_vertical.png onto my scene. It also doesn't have an arrow next to it in ...
-1
votes
1answer
36 views

Moving object orientation toward its movement in unity3d [duplicate]

I have a gameObject (camera) which is moving on the spline. I want to set it orientation towards it movement. Means, object should need to see where it is moving. I some thing tried this but this is ...
0
votes
0answers
16 views

Load a specific sprite by name from a SpriteSheet with Resources.Load

The question is in the title. i want to avoid loading all the sprites from a sprite sheet into a dictionary for example so I can assign them that way. Is there a way to access the specific sprite ...
0
votes
1answer
54 views

Problem with Quaternions and Unity's Euler Angle Convention

So I want to rotate an UI-Element according to my magneticHeading, I just want to apply the magnetic heading to the z rotation in EulerAngles. So I tried to do so, which brought me to some weird ...
0
votes
1answer
23 views
0
votes
0answers
35 views

How to create words as objects in Unity?

I am working on a game that has words as obstacles, i.e. the player needs to climb over and around them. There will be hundreds of words in the game therefore I need a way to automate the placement. I ...
1
vote
0answers
15 views

In Unity shaders, how is IN.worldRefl calculated?

I want to know how the world reflection vector in shaders is calculated so that I can manipulate it, but there is no documentation on what it does or how Unity calculates it. How is the reflection ...
1
vote
1answer
21 views

Calculating the angular momentum of rigidbody in Unity3D

Knowing that angular momentum in 3D is L = Iω (moment of inertia times angular velocity), how do I calculate it in video game world? In unity3d I have the diagonal inertia tensor ...
3
votes
1answer
29 views

In Unity3D, what is the relation between inertiaTensor and inertiaTensorRotation?

In unity3d there are two properties on rigidbody that correspond to the moment of inertia tensor. One of them is: rigidbody.inertiaTensor, which I know is the diagonal of the inertia tensor, The ...
0
votes
1answer
20 views

Coroutine wrong Behavior when scene is loaded.

Ok so I have this coroutine : IEnumerator ShowCharTraits() { while(!hasPlayerChosen) { yield return null; traitPanel.SetActive(true); } ...
0
votes
0answers
16 views

Is it necessary to publish the game App on store in a way work Autocomplete Deep linking

App indexing , Deep linking and Auto complete feature in my game , so Whenever i open the Game it shows the recorded pages of the Game in Auto complete of the Google App , i.e of-course the Start of ...
0
votes
0answers
39 views

Natural Language Processing in Unity

I'm looking for a good solution for Natural Language Understanding in Unity (for example, given the sentence "Bob saw Alice", it will return that Bob and Alice are proper nouns, saw is the verb, and ...
0
votes
1answer
19 views

Have an object rotate on its Y axis towards mouse position [duplicate]

I've been looking at some other answers to similar cases but not every one used different methods, and a lot of them were not what i needed, so here's my question : What's the best/standard way to ...
0
votes
1answer
33 views

Coroutine doesn't continue after checking for bool

I have the following coroutine: public IEnumerator EndGame() { //StopAllCoroutines(); GamePauseController.instance.UnfreezeTime(); ...
0
votes
1answer
31 views

Unity sprite renderer uses standard 2D sprite instead of custom loaded one

I have loaded a 2D sprite from the filesystem and created a sprite from it, which I then attach to a SpriteRenderer. The game object appears in the scene but for some reason it doesn't seem to be ...
0
votes
1answer
32 views

LookAt different object smoothly in unity3d

As picture depicted my camera moving on path i want to lookAt bath different object smoothly. Currently have tried trasnform.LooAt(activePath.gameObject.transform); but it producing jerky result. ...
0
votes
0answers
21 views

Alternative to LookAt in unity3d [duplicate]

How does unity LookAt work i searched and found that this is how lookAt work but seems that it is not right? Vector3 lookPos = transform.position - ...
0
votes
0answers
12 views

Unet 2D sync problems

I've studied Unet but I still can't get it to work right :( I have 3 problems. The first: I can't force player 1 to always spawn from a specific spawn point (and same with player 2). Therefore I've ...
0
votes
0answers
13 views

Rotation towards the movement direction of an object [duplicate]

I have camera which is moving on spline one by one. One complete camera path (spline) consist of several spline and I moving my object on that spline using MegaShape Script package. I have LookAt my ...
1
vote
2answers
31 views

How can I select a object (canvas) with tag using Physics.Raycast?

I made this C# script, becase I want select a Button of the menu(canvas) for choice the dificulty of the game, but I don't want select with mouse I just want select with Aim, and I made this script ...
0
votes
0answers
24 views

How to prevent object from moving when it's mesh/collider is being updated?

So I a made a script that lets the player grab a vertex, move it, and then update the mesh. To help prevent the player from trying to clip it through other objects I made it so the mesh/collider is ...
1
vote
1answer
28 views

Implementing my own UI sprite class in Unity using shaders: where and how to position the sprites

For learning purposes, I am trying to implement my own UI classes in Unity "from scratch", in the GPU using shaders. I mean, I am trying to use simple 2D sprites either positioned via shaders or ...
0
votes
1answer
39 views

Unity 5/C#/Scripting Switching Cameras

How can I switch cameras from First Person to Third person or from thrid person to first person. Like at GTA V you can switch the cameras. How to do this? Tnx for your time.
0
votes
1answer
25 views

Loop in coroutine stops after going halfway

I have a very weird problem with a particular loop in a coroutine: public IEnumerator DestroyCubesGameOver() { var startingCubeHolder = GameObject.FindWithTag("StartingCubeHolder"); ...
-1
votes
1answer
35 views

How do I allow my player object to continue rotating once it's met a clamped boundary?

I have a spaceship I'm moving around on the screen, when the player moves the ship, it rotates on its axis. However, when the ship meets a clamped boundary(on the x-axis) it abruptly stops. How do I ...
0
votes
2answers
61 views

Unity3D - Smooth rotation for seek steering behavior

I am trying to implement Reynolds' seek steering behaviour, but I am having problems on the rotation part. This is what I have: void FixedUpdate() { // get position of current waypoint ...
0
votes
1answer
42 views

NullReferenceException being thrown when I try to add a component to a dictionary

I have the following section of code from a MonoBehaviour class in a voxel engine that I'm currently working on right now: public void CreateChunk(Position chunkPosition) { GameObject newChunk = ...
1
vote
1answer
24 views

Adding a Scriptable Object to the Scene

Suppose a Scriptable Object e.g. NewWeapon.asset with variables such as name, description, price etc. I 've also added a public GameObject weaponObject; so that I can drag and drop the 3D model ...
-1
votes
2answers
23 views

Why is my player object not being clamped?

I have a game object that has specific boundaries. However, when I have the object meet the boundaries, the object doesn't stop the way it's supposed to, it continues to move past the set boundaries. ...
-1
votes
2answers
30 views

Read values from text file

I'm trying to read the data from a text file with numbers separated by tab. And store those numbers in a list of float for example. So that I can then use that list on runtime. Any easy way of ...
0
votes
0answers
9 views

Correcting Vectrosity wire frame line normals

Current Setup This is my current scene, you can see that as the sphere rotates it looks like at the edges(90 degrees) to our normal you see the lines fine but dead on the almost disappear. Grid ...
-1
votes
1answer
51 views

How to constraint random spawn points to a road? [closed]

I have a terrain and a road. I would like for spawn points to randomly appear on the road, and not outside on the terrain. How to assign the spawn points to only be between the road and in random ...
2
votes
0answers
8 views

How to implement app indexing plugin, by using Prime31 UnityPlayerActivity?

I am implementing the App indexing plugin, using Prime 31 UnityPlayerActivity which is implemented by overriding Androinds onCreate, onStop methods etc, but when I use this keyword in onCreate method ...
1
vote
1answer
24 views

Physics2D raycasting with a perspective camera and tilted sprites

So i ran into this problem today. I want to have a perspective camera and sprites that are rotated by lets say 1.5 on the X axis. The problem is that the 2D raycast does not work correctly, it returns ...
1
vote
0answers
43 views

What i'm missing in this multiplayer Unity / photon code?

i'm having some troubles in my first, simple, multiplayer racing game, using Photon and Unity. Following classic photon tutorial i've written the code below, but, it won't work properly. In ...
0
votes
1answer
32 views

Elastically Object movement in unity3d

I want to move an object towards the destination elastically. Currently I am using Vector3.Lerp it working to move the object, start with high speed and reached at destination with low speed but ...
2
votes
0answers
35 views

Is there a way to identify, within a shader, the current GPU thread ID?

My question is rather simple: within a shader, is there a way (that works both in DirectX and OpenGL) to retrieve the ID of the given GPU thread being executed at the given iteration? I am using ...
1
vote
0answers
13 views

Unity - How to match camera bounds to width

While stretching camera bounds, changing width adds black offset while changing height stretches image. How can I achieve opposite behavior and match the bounds to the width instead of height ?
0
votes
0answers
7 views

Unity UI - Assigning Event Callbacks Via Script Fails for Objects Instantied by script

So I have a pretty basic tower defense game going on, there are set build points each with their own mini canvas UI for building and upgrading towers. Once you build a tower on them, they disappear ...
1
vote
1answer
45 views

Make a door in a cube-wall

I have created a wall using a cube in Unity. Now I want to create a door in it. How can I make a door in that cube? Consider that the cube is automatically generated, so i have to generate the door ...
3
votes
2answers
61 views

Why is my alpha transparency not working correctly in Unity?

In Unity I have never seen a bug quite as weird as this one. As usual, I import my texture with a transparent background and then check the alpha is transparency box and apply it, and everything ...
0
votes
1answer
36 views

Blender assets management and workflow for Unity project

I'm trying to decide how to manage my 3D assets, and even how I should construct a world for my game. I should maybe explain, my game is basically a single explorable world set in a school. It's ...
0
votes
2answers
65 views

How do I handle parallel lines when looking for intersections?

I'm using the following method to determine the intersection point of two vector2: public static Vector2 LineIntersectionPoint(Vector2 startPoint1, Vector2 endPoint1, Vector2 startPoint2, Vector2 ...
0
votes
1answer
70 views

Moving object to point a to point b smoothly

I am working on a problem where distance between the point A and B or given and object of interest should move smoothly from A to B. I can control only control the speed of the object using this ...
0
votes
0answers
12 views

Unity: Default values for SerializedProperty with EditorGUI

I have a custom PropertyDrawer for a serializable object that goes inside a ScriptableObject. When I create new assets from the ScriptableObject, all numeric values on the serializable object are set ...
0
votes
0answers
22 views

Need Server to Find Network Identity Components AFTER Initialization

I have a project that spawns bundles of prefabs using a procedural-generation script. Since the Unity networking tool will not recognize child objects as having their own NetworkIdentity, I then move ...
0
votes
2answers
21 views

Moving towards and switching targets in Unity with collision

I have these nodes set up for a ship to move towards over time with out looking stops then repeats in a sequence. like so: 1 2 3 1 2 3 1 2... THE PROBLEMS i keep having either come from the ...
1
vote
1answer
65 views

iOS build size is too large in Unity

I have finally completed my game and ready to upload my game to the App store, but my build size is too large. I have checked log statement and it is roughly 13.3 mb but when i build my game and test ...
1
vote
1answer
61 views

Why does my initial screen disappear quickly in my iOS build, in my Unity game?

I'm developing a game in Android and iOS platforms. I've an initial screen and I'm trying to get next menu scene after a delay of 4 seconds. It works ok in Android but in iPhone, the initial scene ...