Quantcast
Channel: Latest Questions on Unity Answers
Browsing all 171066 articles
Browse latest View live
↧

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 Article


Multiple 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 Article


How 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 Article

Turn 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 Article

Please 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 Article


Accelerometer: 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 Article

Code 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 Article

xbox 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 Article


Can 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 Article


Affect 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 Article

onTriggerEnter 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 Article

inside 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 Article

Unity 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 Article


How 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 Article

How 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 Article


Looking 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 Article

How 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 Article


Adding 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 Article

I 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 Article

How 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
Browsing all 171066 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>