Locking an object in place?
Hi i need away to lock the object in place one i press fire 1 im using it to make a building mechanic also if anyone can help me add a number of uses feture to the inventory system var player :...
View ArticleMultiple lighting models in one shader
Hi I was wondering if its possible to have multiple lighting models in one shader/material so for example a Lambert lighting model and a Blinn Phong lighting model . Reason I ask is cause I may want to...
View ArticleHow to pause emitter in new Particle System?
Is there anyway to ***only*** pause the emitter instead of the whole system? I'm using particle system to create weather effects, like snowing and raining, but the problem is, when I pause the particle...
View ArticleTurn on Script when collide with this object?
I have a script attached to numerous NPCs and I want to send a message to turn on the script for ONLY the NPC that I have collided with and not anyone else. I don't want the 'NpcBattleScript' to turn...
View ArticlePlease help with Mouse aim?
I am trying to make my Camera follow the Sphere with Mouse Aim, it follows the ball but i think that the orientation is changing so the camera is flipping sides. Im still quite a Noob, sorry guys. All...
View ArticleAccelerometer: using to toggle scene
I have the following snippet of code used to toggle between two scenes based on the value of the z-axis. 0.0 to -0.5 for one screen and -0.9 to -1.0 for the other screen. The code works as expected...
View ArticleCode isn't running through
So I'm trying to make a *Ahem* Potato say something when the Player enters the Trigger and Left clicks on the Potato Game object (all of this is 2D). The Potato will ask a question and depending on the...
View Articlexbox joystick axis for 2d movement
Hello there I was working on a game for the xbox and I wanted to know how to use the xbox joystick axis for moving left and right and the xbox a button (I am using a mac OSX ). I have some code already...
View ArticleCan I set a shader to only compile for specific platforms?
I have a shader that I am only ever going to use on desktop platforms, and it is pretty long and takes ages to compile, and also gives me warnings for the xbox 360 platform. Is there a way to prevent...
View ArticleAffect All Instances Of A Prefab
Hey guys, thanks for taking a look at my question. Basically, I am using the gameObject.Find("Object").GetComponent(Script).enabled=false thing. I want to disable a script on all instances of a prefab,...
View ArticleonTriggerEnter not working?
My game has been coded so that when my ball reaches a capsule whose **isTrigger** property is checked, and is tagged **Collectible** the ball will fly upwards 100.0f. void onTriggerEnter(Collider...
View Articleinside rubicks cude partial slice problem
Hello! I'm having a problem I hope somebody can help me solve. I'm working with a modified slice selection script from here...
View ArticleUnity 2d Fire Bullet In Facing Direction
Hello all kinda new to unity 2d so i've had a bit of trouble getting use to it, making a top down 2D platform game. So far got the player firing a bullet along the Z-Axis, and the bullet being...
View ArticleHow to code anywhere below -10?
Currently, I want to code my game so that when my player's position on the y-axis drops below -10, he is set to be inactive. My current idea is that it would look something like this:...
View ArticleHow to display a "Game Over" after death?
I would like to code my game so that when my player dies(or is set inactive), black text shows up in the middle of the screen displaying "Game Over!" How is this possible?
View ArticleLooking for no frills, easy to use online leaderboard solution
Been working on a simple game for a little over a week now...it's nearing completion but it's missing one key feature - an online leaderboard. I've looked into self hosting with php scripts as well as...
View ArticleHow to use Android input
I am trying to make a mouse look script that uses android input not mouse inout can some one help me please thanks in advanced. Here is my mouse look script using UnityEngine; using System.Collections;...
View ArticleAdding custom auto complete to monodevelop
Is there a way to add custom text to the monodevelop code "suggestion" / auto-complete For some reason it won't recognize when I try and reference some unity-scripts in C# I'm using some custom GUI...
View ArticleI need help with control.
Im trying to do a 2D side scrolling game similar to the Mario swimming level. I only want him to swim straight up and have gravity to pull him back down, no left or right option. I have a script tied...
View ArticleHow can I Find All References to an object in the inspector?
I have inherited a huge project in Unity 3.5, which makes heavy use of dragging/picking object references from an object in the hierarchy to some other object in the hierarchy. There is no...
View Article