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

Dynamic load and unload material

For targeting multiple display resolution, I focus on using MultiPlatform Toolkit usage. In which I found following statement in tutorial section for dynamically handling materials. "Just remember ...
2
votes
1answer
183 views

When one should use events in Unity and how they impact performance?

let's say that inside an OnGUI() script we want to call a method from another script to handle a particular situation. From a prestational point of view, what's the difference between these 3 ...
0
votes
0answers
157 views

Run a few seconds of simulation just after loading a scene

I'm looking for a way to execute 3 to 15 seconds of simulation once a scene is loaded. The problem is: some objects can be left suspended in motion while the player exits the scene. their state is ...
2
votes
0answers
114 views

Design Question, Thoughts on Path Finding for a Galaxy Map [closed]

I am thinking through solutions for a galaxy map. We have different solar systems that need to be connected. I do think a-star (A*) is possibly a good solution but was curious if it was really the ...
0
votes
1answer
688 views

How to clamp player movement correctly?

I have a 2D space shooter game. I looked up some questions from unity community and came across this solution. Below is the code for my player's movement: //horizontal <- || -horizontal -> ...
-2
votes
1answer
169 views

How to know the relative facing angles between two players? [closed]

I want a grappling system similar to Tekken, in which different grapples animations are performed depending on which side of the opponent the player performing the grapple is facing. For example, ...
1
vote
0answers
100 views

Player glitches through floor? [closed]

I'm making a 2D platformer in Unity, and everything is going pretty smooth, accept I can't figure out why my player is glitching through the floor, the player will collide for a few seconds while ...
0
votes
1answer
270 views

Destroying non-monobehaviour derived classes

I'm building an inventory system with different items classes deriving from a 'Item' base class. When an inventory slot runs out of the item it holds I want the item to be destroyed. I cannot null ...
1
vote
1answer
299 views

Rotating a GameObject around its center

I'm trying to rotate a GameObject that consists of several cubes around its center of gravity on an axis. When using transform.Rotate(), it rotates around its pivot point (as shown in picture 1) and ...
0
votes
1answer
3k views

Switch character to play animation() in Unity3D using c# [closed]

I have two or more 2D character (Character A, B, n..). I made an animation on the character using the Animator class "AnimCharacter.cs". if i press the 'PgUp' character 'A' can call the function ...
1
vote
4answers
697 views

Get GameObject to bounce of colliders [duplicate]

I am making a Atari Breakout game with unitys 2d tools and I need to get the ball to bounce of colliders in the scene. If you havent played the game before how it works is if the ball hits the wall at ...
0
votes
1answer
473 views

Problems implementing a 3rd person static camera in Unity3d

I am building a space game that I would like to be controlled in third person. Basically I would like the camera and the ship to remain tied together and remain the same distance from each other but ...
1
vote
1answer
365 views

Unity seperation of prefabs with two dimensional terrain generation

I have the following function: public void Spawn () { GameObject g = ((GameObject)Instantiate (hills [Random.Range (0, hills.Length)], new Vector3 (0.0f, ...
2
votes
1answer
747 views

Create sprite renderer using custom material

I have done following thing. Create Material Attach sprite with texture type as Texture Add sprite renderer component to game object Assign material to it that I create in last steps There is no ...
1
vote
0answers
283 views

Is there an up-to-date Sublime Text 3 package for Unity3D C# completions and snippets? [closed]

I found a couple on wbond, but the only one that's been more or less recently updated has less than 1K installs. Does anyone have experience with Sublime 3 and Unity? I'm mostly interested in 2D ...
1
vote
1answer
231 views

Depth write and depth test in Unity

Scenario: several objects (o1, o2,.., on) have to be rendered with the z test disable, but the z values must be written to the depth buffer. In another pass, some other objects (t1, t2,..., tm) need ...
0
votes
1answer
245 views

Using Appendbuffers in unity for terrain generation

Like many others I figured I would try and make the most of the monster processing power of the GPU but I'm having trouble getting the basics in place. CPU code: using UnityEngine; using ...
2
votes
3answers
1k views

Polygons vs sprites rendering performance in Unity for windows phone 8

I'm currently building a windows phone 8 game with unity, having 111 (no more no less) sprites being updated each frames. I have a strong overhead in the profiler (70% to 90% minimum) I tried the ...
0
votes
1answer
151 views

Create texture the size of my mesh

I programmatically create a Mesh and want to generate a texture that patches coloured squares together so that the patchwork perfectly matches the vertices. The mesh's dimensions are expressed in ...
1
vote
1answer
1k views

Moving rigidbody2d towards mouse click using AddForce

I cant get my rigidbody2d game object to move to where i click the mouse. The first click works. The object travels to the mouse click and stops. But the second time (or the third time) i click the ...
-1
votes
2answers
163 views

Unity score on touch adding up incorrectly

I'm currently working on a game where a user can click an object and this should increase their scored by 1. Unfortunately it seems to be increasing it by more than 1 sometimes and I can't figure out ...
1
vote
0answers
935 views

How can I get this Shader for Unity working with Normal maps? [closed]

So I'm by no mean a shader coder, but I've been hacking around the last few days trying to get working a shader for the sprites of the skeletal animation tool Spine in Unity that can properly use ...
-1
votes
1answer
156 views

lerp z rotation towards mousepointer

I am trying to get transform.rotation.z to chase the mouse pointer at a rotation speed. But I get a very weird results and can't figure out what I am doing wrong. var mp = Input.mousePosition; ...
-2
votes
1answer
177 views

Lerp speed or lerp time [closed]

Am I right about the fact that lerping can be done over a set period of time or at a speed which will continue until the target is reached? How are the formulas for the two? Is it something like ...
1
vote
1answer
285 views

Strange collision behaviour in 2D game even though the collision is very basic [closed]

I have a player ship (cube) and some enemy laser projectiles. When the player ship has position X values greater than 1, collision with the enemy projectiles occur but when it has lower X values, the ...
-1
votes
1answer
264 views

Match-3 “find matches” function not returning correctly

So I'm in the process of making a simple bejeweled clone and for some reason my "find matches" function is having problems. I've broken it up so it check horizontally, then vertically and right now ...
7
votes
3answers
442 views

How can I keep two racing players synchronised?

I am working on a Unity mobile game, much like a multiplayer version of Temple Run. I'm seeing a fluctuating network latency (generally 200-500ms) because of the mobile platform. The two player ...
-1
votes
1answer
95 views

Lerping back and forth in Coroutine [closed]

Im trying to lerp the scale of a game objecto to 30% its size and then back again, but all i get as output is " Blippping Cursor up scale 0 down scale 0 IEnumerator Blip_cr ...
0
votes
0answers
48 views

Memory Management on Physic Body Frames in Unity

Compared from the Android programming with the help of LibGDX and Eclipse programming software in making 2D physics based game from this previous question, what if I'm throwing lots of game objects ...
3
votes
1answer
513 views

Unity Spaceship camera control

I'm trying to make a third person spaceship control system in Unity. In theory, it works like this: Let's suppose you move your mouse to the right. The targeted direction would rotate to the right ...
3
votes
1answer
2k views

Moving a character according to the animation, rather than code

I'm using 3ds Max to export character animations in which my character is moving. I expected this to mean that the character will move in Unity, but it doesn't... For example, if my animation (in 3ds ...
3
votes
1answer
689 views

Issue with interpolation on a burn shader (lerp and smoothstep)

I'm trying to create a simple burn shader. See here for more info on the method I'm using. However, I don't get why replacing the smoothstep with a lerp results in completely different results. Am I ...
1
vote
1answer
354 views

How do I create indoor scene lighting? [closed]

I'm building the inside of a space ship in Unity as POC. I need info on scene lighting. Rooms, corridors or just in general how to make an enclosed scene look great with lights. Keep in mind this is ...
1
vote
0answers
59 views

Weird floor blur close to camera [closed]

So simple question I guess. I created a floor with texture and when I fly with the camera there is the strangest blur in front. Almost like a circle surrounding the camera looks fine and then a line ...
0
votes
0answers
95 views

Unity Mecanim Glitch

I am used to using the old animation, but I wanted to start using Mecanim. Here is an image of a creature I modeled with some animations, in blender, in my unity scene: And here is the blend import ...
0
votes
1answer
119 views

How do I change the size and specific height values of Unity generated terrain?

I'm having problems with terrain scripting while trying to do a infinite-world with Unity's terrain generation. How do I change the terrain height at specific points? And how do I set the amount of ...
1
vote
1answer
65 views

Loading source controlled MonoDevelop project leaves out some folders

I have recently started using version control in MonoDevelop and have discovered that if I include a folder containing for example Scenes that they will be included when I push changes to master. My ...
2
votes
1answer
148 views

At same positioned game objects collision detection

In my game, I am creating two game objects at same position using Instantiate statement. Each generated object has box collider attached. So I want to detect collision between them so I write ...
3
votes
2answers
776 views

Recommend a way to draw thousands of particles (liquid) per frame in Unity3d

I'm writing a plugin for this library for Unity3d. I have it working and now I am looking for an efficient way to draw the particles. My 1st test just uses sprites and runs fine on my laptop but I ...
0
votes
1answer
702 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 ...
4
votes
1answer
784 views

Problem getting information about running processes with .GetProcesses() in Unity3D on OS X

I was going to ask this on Unity Answers, but I keep getting an error when trying to get to the site so thought maybe you guys could help. I've also tried the Unity3d subreddit and didn't manage to ...
-1
votes
2answers
1k views

How to move rigidbodies

Have i understood this correct: If i want to use a rigidbody for physics then i should not move an object through its transform.position. I should never move it by riigidbody.velocity since i then ...
1
vote
1answer
1k views

How can I make caves with Unity's terrain creator?

With Unity's terrain creator, I can't simply make a "hole" on the mesh. I don't know how I would make cave-like structures other than using "rock" meshes for the roof (wich will indeed look weird) ...
7
votes
4answers
804 views

How does creating 2d game assets differ from regular 2d art? [closed]

I've done some digital paintings and concept sketches in the past, and I was thinking about employing those skills in my game making efforts. From an artists standpoint, what does he have to do ...
-1
votes
4answers
2k views

Too much animation work for 2d characters. Creating 2d character animations by prerendering an animated 3d model?

I've read a bit about creating assets for games and the consensus seems to be that 2D is cheaper than 3D in all aspects with the exception of character animation. That's caused by the need of ...
0
votes
0answers
566 views

Box2D Soft Body Wheel in Unity3D

I was watching this video made with IForce2D, its about creating soft bodied wheels in box2D. http://www.youtube.com/watch?v=F-aDMZUVw0c I wanted help in being able to increase the Radius of the ...
0
votes
6answers
924 views

Quaternion Lerp never reaches target

I seem to have misunderstood something about how LERP works. Im not sure what is missing. The object is rotating as it should, but it cant seem to get it to end. The transform.rotation dont seem to ...
2
votes
1answer
597 views

Paint with soft brush (logic)

During the last few days I was coding a painting behavior for a game am working on, and am currently in a very advanced phase, I can say that I have 90% of the work done and working perfectly, now ...
1
vote
0answers
287 views

Consequences of running a Unity APK on Intel processor driven Android devices?

As more Android device manufacturers will be implementing Intel processors in the future, this question might be interesting for everyone who wants their Unity games to run on these devices. I ...
2
votes
1answer
708 views

How do I make an object face the mouse position, but only on one plane?

I want a game object to turn and look towards where the mouse was clicked (in world space). It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z ...