Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unity]

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.

3
votes
4answers
3k views

Using Lerp to create a hovering effect for a GameObject

I want to have a GameObject that has a "hovering" effect when the mouse is over it. What I'm having trouble with is actually having a color that gradually goes from one color to the next. I'm ...
0
votes
1answer
2k views

Periodic updates of an object in Unity

I'm trying to make a collider appear every 1 second. But I can't get the code right. I tried enabling the collider in the Update function and putting a yield to make it update every second or so. ...
5
votes
1answer
6k views

Finding if a point is inside of a mesh (Point-in-polyhedron)

How can I find if a point (Vector3) is inside of a mesh? Would this work for both concave and convex objects? I read somewhere that if you raycast in both directions of every axis (X, -X, Y, -Y, Z, -Z)...
2
votes
2answers
386 views

How to prioritize related game entity components?

I want to make a game where you have to run over a bunch of zombies with your car. When moving around, the zombies have a few things to take into consideration: When there's no player around they ...
-1
votes
1answer
3k views

How to adjust the shooting angle of an object

I've been trying to add an angle adjustment feature to a power bar that I got from unity3dStudents. But I can't seem to get the code right. I'm using addforce to rigidbody, it works but the power is ...
1
vote
1answer
338 views

Stuck at enemy movement

I am making a TD game in unity, Initially I made all of my enemy movements frame rate dependent say: I had a grid point1 at -22.65 and other at -21.1, diagrammatically: (-22.65) _________(-21.1)...
1
vote
1answer
5k views

Unity: Spin wheels to move vehicle

I am just getting started with Unity and I'd like to ask a question. If I have a "Vehicle" object that has two children: "FrontWheel" and "BackWheel" (both 'wheels' are cylinders), how should I set ...
2
votes
2answers
3k views

Smooth vector based jump

I started working on Wolfire's mathematics tutorials. I got the jumping working well using a step by step system, where you press a button and the cube moves to the next point on the jumping curve. ...
3
votes
2answers
9k views

How To Smoothly Animate From One Camera Position To Another

The Question is basically self explanatory. I have a scene with many cameras and I'd like to smoothly switch from one to another. I am not looking for a cross fade effect but more to a camera moving ...
0
votes
1answer
3k views

Making a surface transparent from blackness of texture

I am making a "halo" shader in unity using GLSL. And I've come to a roadblock. What I need to do is take a texture, like the following, and make it transparent according to the darkness of it. And I ...
0
votes
1answer
3k views

Render 2D textures on a 3D object's face

I am not familiar with 3D graphics, and I'd like to know the right way to render some 2D figures on different points of a wider face of a 3D object. My 3D object is just a cube representing a poker ...
2
votes
1answer
376 views

Moving Unit Parallel to Mouse in TBS Game

I'm writing a basic Turn-Based Strategy game using Unity3D. It's not grid-based. I've come to the point where I'm coding unit movement, and I'm having trouble figuring out how far to move the units ...
7
votes
1answer
1k views

If I make a 3d model in a .fbx format, do I owe any royalties/fees to autodesk for using fbx files in Unity?

I'm currently making a game where every format for every asset is either opensource/freeformat, or requires no license fees to use. I've pretty much settled happily on .ogg for audio, vorbis/webm for ...
1
vote
2answers
5k views

Unity3D: Touch and Objects have different coordinate systems

I would like to associate the same script to different empty objects I just use as placeholders in the game. The aim is to exploit their positions so that when the user touch a point in the screen, ...
0
votes
1answer
109 views

Help figuring out how to build for the iOS Unit3D

So currently I'm exporting my game strictly for testing to the iOS (iPad.) I don't own a Mac, so I'm having my client make a build from his Mac, but that means I need very specific instructions for ...
2
votes
1answer
728 views

2d game with png sequences slowing on Unity3d

We are building a tower defence game,In which enemy movement is done through sprite sheets as well the tower rotation is also done through sprites...every tower and every enemy has its own script ...
2
votes
2answers
4k views

Destroying instantiated objects stored in a list not working in Unity

I have a GameObject with associated a javascript. I have defined a private variable like this: private var objects = new Array(); now in the Update method I ...
7
votes
1answer
23k views

most efficient way to create a grid system in unity

I'm creating a little tower defence game to get myself acquainted with unity. At first I was going to emulate a grid system by capturing touches / mouse clicks and rounding the coordinates to the ...
2
votes
1answer
2k views

Why can't I expose a Plane variable in my unity script?

I've got a script which creates raycasts. I wanted to use the (presumably less expensive) Plane.Raycast rather than the GameObject.Collider.Raycast (because the gameobject one has a distance parameter ...
27
votes
4answers
27k views

How do you save game state?

What is the procedure followed by game programmers for saving and resuming game state? like files/mappings. I want to save it for tower defense game and I am using unity3D game engine.
1
vote
4answers
1k views

Does Unity Pro Play Nice With 'Small' Teams

Does anybody know how well Unity Pro plays well with-in small teams? Our team makeup is 2 programmers, 1 audio, and 2 graphics peps. How easy is it for somebody to mess up a Unity project? The ...
2
votes
2answers
4k views

Creating an object in javascript with unity (unityscript)

So I have a ton of experience with JavaScript (its what I do for a living) but I am new to unity. I have built a game engine in javascript but now want to move it over to unity. I have been trying to ...
0
votes
1answer
597 views

Unity3D - different object with the same mesh imported from Blender

I would like to instantiate different objects (i.e. poker chips with different values) that actually share the same mesh imported from blender. To this end I have copied the assets and changed the ...
9
votes
2answers
29k views

Resolution problems when porting a Unity game to Android

So, I'm porting a game to the Android for the first time in Unity3D. And I've run in to a few problems along the way. My current problem is the resolution doesn't seem to be right, it cuts off the ...
1
vote
1answer
1k views

Locomotion-system with irregular IK

Im having some trouble with locomtions (Unity3D asset) IK feet placement. I wouldn't call it "very bad", but it definitely isn't as smooth as the Locomotion System Examples. The strangest behavior (...
4
votes
2answers
285 views

How can I store a set of concrete components and implement “GetComponent<T>()?”

I would like an abstract class, AbstractComponentAggregate, which has many AbstractComponents. Users of my framework will create their components by extending AbstractComponent and appending the ...
1
vote
2answers
8k views

Check collision between instantiated objects?

I am using a script to instantiate multiple objects having rigidbody with different velocities at different positions. I want to destroy two or more objects when they collide, but I'm not getting ...
16
votes
1answer
7k views

Procedural Mesh: UV mapping

I made a procedural mesh and now I want to apply a texture to it. The problem is, I cannot get it to stick the way I want it to. The idea is to have the texture painted only once over the whole mesh,...
1
vote
1answer
2k views

Creating thrusters on a ship in Unity3D

So, I'm using the legacy particle "small flames". Basically what I want it to do is always emit below the ship, so when the ship turns and such it still looks like the thrusters are firing. I know ...
0
votes
2answers
2k views

How to Translate and Position at the same time?

Hi I'm having problem Translating and Positioning at the same time e.g take example of retro spacecraft shooting games in which your spaceship moved in x-axis automatically and you just needed to ...
1
vote
0answers
4k views

Building for the Android errors Unity3D [closed]

EDIT: After doing some research on my own I found that by deleting the debug.keystore file everything fixed itself. So currently I'm exporting my game strictly for testing to the Android. However, ...
4
votes
1answer
2k views

How do I determine the position of one vector relative to another?

I'm making a game for Kinect in Unity which tracks hand movements. I have the player's root position and the position of their fist stored as 3-dimensional vectors (...
2
votes
5answers
18k views

Which is better for a beginner, UDK or Unity? [closed]

I am just getting into game development and I would like to know which engine would be best to learn first. In terms of my current skills, I know a good deal of javascript, but not much beyond that. ...
9
votes
2answers
15k views

How do I make my character slide down high-angled slopes?

I am currently working on my character's movement in Unity3D. I managed to make him move relatively to the mouse cursor. I set a slope limit of 45°, which does not allow the character to walk up the ...
2
votes
2answers
1k views

Getting one rigidbody to follow another, but still react to stuff Unity3D/C#

Basically what I'm doing is having a ball you can pick up and drop on a ramp. When you pick up the first ball, the second ball follows close behind, and when you drop the first ball on to the ramp the ...
2
votes
3answers
4k views

How to make a ball fall faster on a ramp?

So, I'm making a ball game. Where you pick up the ball, drop it on a ramp, and it flies off in to blocks. The only problem right now is it falls at a normal speed, then lightly falls off, not nearly ...
4
votes
4answers
9k views

what is the simplest 3d software for unity? [closed]

Ive heard a lot about Daz studio, Poser, Maya, K-3d, Anim8or, Blender, and all the rest. My question is which one is the best choice in terms of simplicity and quality. price is not an issue really. ...
3
votes
1answer
8k views

Unity3d vector and matrix operations

I have the following three vectors: posA: (1,2,3) normal: (0,1,0) offset: (2,3,1) I want to get the vector representing the position which is offset in the direction of the normal from posA. I ...
2
votes
3answers
1k views

Help comparing Cocos2d and Unity3d for this project [closed]

I will not go into details, but I would like to hear your opinions about this: Essentially, my project will be a 2d game, with lots of complex levels, where some might be simple and others might be a ...
2
votes
2answers
13k views

After building a .exe file game view does not show whole viewport

So, I went to build a game today in a .exe, and when I build it, it doesn't show the whole viewport as it does in the unity engine itself. So the game is cut off. It does this no matter what I do. ...
16
votes
3answers
12k views

Ledge grab and climb in Unity3D

I just started on a new project. In this project one of the main gameplay mechanics is that you can grab a ledge on certain points in a level and hang on to it. Now my question, since I've been ...
2
votes
1answer
1k views

Getting a sphere to roll down a .FBX object Unity3D/C#

I'm working on a little ramp and ball game in Unity, I modeled the ramp outside Unity and exported it to a .FBX file, then I imported the ramp in to Unity. I set up the ball and ramp, both have ...
10
votes
1answer
7k views

Can you embed a Unity3d mobile project into an existing native mobile app?

I am creating an application for both Android and iPhone that will have a few mini games in it. I would like to create the non game section in native Android and iPhone. My question is, is it possible ...
2
votes
1answer
807 views

Is there a way to keep the mesh collider when updating objects in Unity?

I have a 3D object as an imported asset in Unity which i want to make updates to in Maya. The asset get's updated automatically in Unity when i save the object in Maya - but not in the project ...
45
votes
2answers
9k views

How to render realistic ice?

I am trying to write an ice shader in Unity that looks good and at least semi-realistic. If the following shot (found on Google) was CG, what would its shader include? (the foreground cave). I might ...
0
votes
1answer
1k views

Animations in FBX exported from Maya are anchored in the wrong place

We are trying to export a model and animation from Maya into Unity3d. In Maya, the model is anchored (pivot point) at the feet (and the body moves up and down). However after we have performed the ...
2
votes
2answers
6k views

Creating natural environments that can run on lower end computers in Unity3D/C#

So, I'm starting work on a project soon that will require me to create realistic environments that can preferably run on PC's besides high quality ones. The goal is to get as real an environment as ...
6
votes
1answer
2k views

Things to do to port game made for iOS in Unity to Android?

I have just made my first game for iOS and submitted it to app store. I was thinking of porting my game to Android also. I would like to know things one need to do/remember to port game made for iOS ...
15
votes
2answers
7k views

How should I account for the GC when building games with Unity?

*As far as I know, Unity3D for iOS is based on the Mono runtime and Mono has only generational mark & sweep GC. This GC system can't avoid GC time which stops game system. Instance pooling can ...
3
votes
1answer
3k views

How to control a spaceship near a planet in Unity3D?

Right now I have spaceship orbiting a small planet. I'm trying to make an effective control system for that spaceship, but it always end up spinning out of control. After spinning the ship to change ...