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.
-1
votes
0answers
5 views
Before I change position I want to check if the gameobjects are collinding
For starters I'm new to Unity3d. So my question is when I click on an object I want to change its position but without collinding with the other objects and I need a function to check that. I already ...
1
vote
1answer
156 views
Unity: LineRenderer always behind Sprite
So I'm not sure what I'm missing here -- I created a bullet gameobject with a linerenderer (no sprite renderer) -- and it always renders behind my other sprites, regardless of what I set the z ...
-2
votes
0answers
17 views
Drag object vertically in unity 2d
I'm new to unity and I'm currently working on a game with unity 2d. I want to know how can I drag only vertically an object on touch. The camera is in mode perspective. I appreciate your help.
-2
votes
1answer
31 views
How to manipulate unity camera in a C# script?
I am new to unity and i'm trying to move the camera to follow the player, but everything i tried won't work. Please explain what each step is and show code. I want to add to its position not use ...
0
votes
1answer
236 views
One Android app, dynamic load several Unity games
I'm a newbie in this unity world, exciting about everything in it.
Days ago I came up with this idea:
One day someone finds this android app, naming "Blahblah Game Engine" or anything else. This ...
1
vote
1answer
299 views
How do I Rigidbody.AddForce(Vector3) in Unreal Engine?
I am coming from the Unity Engine, and trying to get my feet wet with Unreal Engine 4.8.x. I want to add a one-time force to an object. To accomplish this in Unity 5, I would use:
void Start(){
...
1
vote
1answer
59 views
Player takes to long to start walk
I'm new in Unity and after doing some tutorials and read documentation from Unity, I've started a test project. The game is a 2.5D platformer and I wrote the PlayerController; It looks like this:
...
0
votes
1answer
256 views
How to move rigidbody player to its facing direction with AddForce?
How can I move a rigidbody to its facing direction? I've already tried this:
rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration);
// v is a public float which gets a new value in ...
0
votes
1answer
223 views
Marching Cubes Chunks
i'm doing some voxel based game, where i want to have voxel planets. i decided to use the marching cubes algorithm, and i successfully created a planet (even with noise) with the following density ...
2
votes
1answer
15 views
Unity 5 Standard Assets for Linux / Ubuntu
Unity recently has released Unity3D Editor for Linux machines. But in its website there is no support for Linux / Ubuntu. As of Unity 5 standard game assets have been removed from the editor itself ...
2
votes
0answers
60 views
calculating torque from angular momentum considering inertia moment
so I am trying to determine exactly how much torque to apply to a 3d model to make it rotate at a particular rate.
I apply force from the location of each engine on the craft so if one breaks the ...
0
votes
0answers
31 views
Snap gameObject to grid tile
I'm making a 2D TD game and currently I have made using quill18 tutorials a simple building system. However I'm trying to have it snap on my tiles as I mouse over them.
This is my script applied to ...
0
votes
2answers
298 views
How to make a gameobject Scale up from another GameObject script
hi there im having a rought time with this code, trying to make a gameobject grow in scale from touching this one, and when a set amount of scale is reached destroy this game object ( the one who ...
1
vote
4answers
6k views
How can I do something only after an animation has finished?
I'm making this 2D platform based game. Basically what I want is when the player walks into spikes (which have a "deadly" tag") it displays the animation that has the parameter of animate with the ...
0
votes
1answer
15 views
Call function after Level loaded
I'm stuck in this situation:
I have a GameObject with a script, that persist trough Level loads.
Inside this script, when a condition is meet, i Load a Level, and also call a function. That function ...
1
vote
1answer
498 views
Adding materials to a Line Renderer through code? (Unity)
I have a material that I am using to add a glowing effect to my line renderer. I can add this as a 2nd material to the line to give it a glowing effect.
I want to be able to add/remove this material ...
1
vote
2answers
63 views
Any way to load/execute scripts (game-logic) included in a post-release DLC (Unity3D AssetBundles) on iOS since it seems its not allowed?
We are making a game where players will be granted access to new levels every week and these new levels will probably be downloaded from our server as Unity Asset Bundles
The only issue is, as ...
1
vote
3answers
208 views
2D Sprites vs UI Image Scripts in Unity
I am doing a 2D casual puzzle where the user can drag and drop some pieces into a board. The pieces are 2 or 3 or 4 tiles. Each tile may have text over the sprite.
Target platform: Mobiles and ...
1
vote
1answer
94 views
How to save the Mesh from an Interactive Cloth at runtime in Unity?
At the start of a scene I have GameObject called 'sheet' positioned above a 'ball' GameObject. The sheet has an Interactive Cloth component on it and a Cloth Renderer. The Mesh for the Interactive ...
0
votes
1answer
130 views
Casting a directional line of which an object is coming from
I want to create a directional line ( curve / linear ) depending where the direction is coming from.
In some games, similar to Angry Birds, a dotted guideline is shown to provide where the gameObject ...
0
votes
0answers
15 views
Unity Skin Shader to GLSL
I was hoping that I could get some help converting a Unity Skin Shader to a more common GLSL readable format.
I found a skin shader that looks decent and would like to give it a try:
...
1
vote
1answer
76 views
Enemy AI with Rigidbody - Floating in the air
I'm working on my enemy AI scripts and I'm using a rigidbody to have the enemies chase the player when the player gets into its aggro distance.
Two of the main problems I'm having:
When the game ...
2
votes
1answer
1k views
Unity 4 mecanim; 'Quaternion to Matrix conversion failed, input quaternion is invalid'
I'm trying to animate a stick figure in Unity, with placeholder animations. Character is built/animated in Blender, exported to FBX. When imported to Unity, everything appears correct in the editor. ...
0
votes
0answers
21 views
MonoDevelop won't start
I'm unable to open the MonoDevelop for script writing. I've done all the things mentioned here:
http://answers.unity3d.com/questions/574157/monodevelop-not-opening-in-unity-43.html
When I replace the ...
0
votes
3answers
154 views
How do I size my map in blender so it will be the right size in unity?
I am working on a fps game but I cant get the size right of my map in blender, every time I export it to a .fbx file (unity won't work if it is a .blend file) it is a super small plane floor in unity ...
1
vote
0answers
37 views
Reverse Movie in Unity 5
guys! Is it possible to reverse video or apply a rewind in Unity 5? I searched in the web but could not find the solution.
0
votes
2answers
217 views
How to flick gameObject using Touch?
I've been searching for a solution for my problem for a while on the web, but i didn't find anything that work properly
What i want to do
I have a bouncing ball and I want to let the user flick it ...
0
votes
0answers
27 views
Goal keeper AI with animation
I'm working on football simulation game. I am trying to implement Goal keeper AI. I did calculated ball trajectory and intersect point. I wanted to Goal keeper to dive to the interaction point and ...
4
votes
3answers
777 views
How do I access a Unity class from an Android Activity?
I have made my own C# classes in Unity. How can I access them from the Android Activity that starts the UnityPlayer?
Example: I have a C# class called testClass in Unity:
class testClass {
...
0
votes
2answers
3k views
Can't play animation from script in unity
I'm making a 2D sidescrolling game in Unity, and when the player shoots an obstacle, I want the obstacle animation to play and then destroy itself. I got it to destroy itself, but the animation won't ...
0
votes
2answers
531 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 ...
0
votes
3answers
145 views
Backround turning, follow the character
In my Unity2d-platformer, I need background to follow the character, so I just attach it. And when character turn left from right (or right-to-left), background turn too.
How can I make my ...
1
vote
1answer
35 views
How can I simulate a “Hot Swap” betwen Audio Clips?
I have a Unity project with 3 separate looping Audio Clips and a single Audio Source. Based on certain events, I swap between which of them are playing.
This works fine, but whenever I swap between ...
3
votes
1answer
29 views
Why doesn't the animtor animate in unity5?
I have a player consisting of 20 different body parts which I have animated into a walking cycle. When I play the animation in an 'animation' component it works as intended, but when I try to play it ...
1
vote
2answers
43 views
Is it possible to have FixedUpdate execute once every n frames?
I'm currently building a small game, and I've created this simple character controller using FixedUpdate, which executes every frame.
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
...
3
votes
2answers
424 views
What's the proper way to set up a texture atlas in Unity 3D?
I am using Unity3d (free) to make a game with user-defined content (i.e., load in a map, it'll build the level for you).
Everything is working as expected, except for the rendering.
Note the ...
0
votes
2answers
2k views
Play animation when click on each player with in maincamera unity3d
I have 3 gameobjects (player1, player2, player3). I attached a script "playerscript" to these game objects. In the main camera, I have added another script called "testscript". Clicking on a player ...
-3
votes
0answers
35 views
Unity 2D Roguelike Tutorial Bug [on hold]
I've been learning to code and create games in Unity 5, with their video tutorials and while working on the Roguelike Tutorial I created a bug that I, for the life of me cannot fix. Here's what ...
1
vote
2answers
316 views
Unity crashes when opening a project
Why does this happen?
I'm new to Unity development. I have installed Unity yesterday (2015-09-06). This is the error that I get:
0
votes
1answer
30 views
How to manipulate unity objects in a C# script?
I am new to unity and i was wanting to know how i can change a objects position and angles and stuff like that in a c# script. I exported the object from blender as .3ds. The objects name is ...
0
votes
1answer
21 views
How to force Landscape Mode Unity3D Android Game?
I am developing a small side project on Unity that will ultimately be for Android but I cannot figure out how to force landscape on the device and when I have tried it out the game just goes all over ...
0
votes
0answers
4 views
Unity PhotonView - Ownership problems when synching objects
Im creating a billard game where one white ball will be controlled by two online players.
I have set my object photonview to ownership takeover:
https://www.dropbox.com/s/kq79lfh4clerx7q/no.jpg?dl=0
...
1
vote
2answers
21 views
Unity LoadLevelAdditive and baked light scene settings
I am a programmer for a small game.
For our levels, I separated the UI from the level data, so one scene is a scene which contains only the UI, the other scene has all the gameobjects and models and ...
1
vote
4answers
95 views
How to load and unload objects at a certain radius from the player?
I am making a procedurally generated space exploration game in unity. I'm currently generating 5000 stars in a cube of a fixed size. Each star just gets a random 3d coordinate. What I would like to do ...
0
votes
0answers
17 views
Objects with custom shaders cast grayscale shadows when lightmapped
Unity 5 seems to be able to calculate colored shadows from objects mapped with standart shader and legacy shaders.
What should I do to make my custom shader to cast colored shadows as well?
1
vote
1answer
41 views
Change Material color programmatically
I'm writing a simple C# Script to change Materials color of a object.
public class Highlight : MonoBehaviour {
public bool Mouse_Over = false;
public Color Highlight_Color = Color.white;
...
0
votes
2answers
165 views
Unity PHOTON/PUN Collision Detection
I am trying to create a virtual 3D chat room based on character interaction (just like in Sims2), so I have added a collider on the "user's in-game character". The problem is that when I enable the ...
5
votes
2answers
450 views
Geometry Shader not generating geometry for some Vertices
I am playing with a geometry shader and I am wondering why it doesn't generate geometry for each vertex in all meshes?
I don't think this is a Cull problem because the same vertices generate ...
0
votes
3answers
78 views
2D Physics friction on a moving platform?
I have a few basic platforming mechanics going on in this scene. I have a prefab platform with an animation that loops back and forth between two different x positions, but does not begin looping ...
0
votes
1answer
176 views
Unity: why game app on Android takes up much more memory than Unity Profiler reports?
We are profiling a game app on Android 4.4.2 device via Unity’s ADB profiling.
We have set up ADB profiling following the official guide: http://docs.unity3d.com/Manual/Profiler.html
The ADB ...