Quantcast
Channel: Latest Questions by Macdude2
Browsing latest articles
Browse All 38 View Live

Slide Down Walls

Alright, so I have just got into unity so I have been copy and pasting code and then looking over it thoroughly to see what makes it work. This code is mainly from the unity wiki. I am trying to make...

View Article



Move Object to Bullet Position

I am sure this is easy, but I have been having an extremely hard time making this happen. I have been trying to make it so that I can shoot a bullet which I have instanciated. Then when it hits the...

View Article

create a building with the same texture

Alright, so I am trying to build a building that has walls of different lengths and heights. However, I would like all of these walls to have the same texture on all of them. But, when I apply the...

View Article

View entire object when on intersection of wall

I am building a game where there are many walls surrounding the player. He is fighting and one of the weapons is a grenade that can land on walls and blow up when he presses a button. However, when...

View Article

Animate Doors and Button Through Script

Alright, I have tried to create doors, a button, and a collider to trigger the button in order to make it so that if a player walks onto a button, it will open the doors. However, I would like the...

View Article


Ipod touch 2g lag on application.levelload

So I have created my iphone app and successfully implemented it on my ipod. However, it only seems to work well on the first level. When I program some action to call on the script...

View Article

character controller only triggers colliders on its sides

My problem is that when I walk my character controller over to a collider that is verticle and marked as a trigger, the trigger activates and everything acts right. But when I walk my character...

View Article

Change velocity of Character Controller

I am using a character controller as my main character in my game and I would like to be able to randomly change his velocity based on how much he falls. I can detect his velocity be calling...

View Article


turn on and off character controller

I have tried and tried to get a script working where if the character controller is not touching anything, it will get destroyed and turn into rigidbody with a sphere collider. Then if the collider is...

View Article


Check to see if integer is between two others

Is there a more efficient way to check to see if a value is bewteen to other values than doing : if(scrollPosition.x > Screen.width*.25 && scrollPosition.x Screen.width*.25){ //code } it...

View Article

Animation not playing when returning to a previous loaded scene

When I start my app, I have a animation the plays in the menu screen. This animation works great when it is first loaded upon opening the app, however, when I try to load the menu during any level of...

View Article

Giant spike with level load causes crash with iphone

My app works great until I try to load my first level in which it crashes on all devices other than the iphone 4 because it spikes to 300ms + per frame. How can I stop this? I have the profiler pic...

View Article

How to make code more efficient

Is there any possible way to optimize my code further? I am really aiming to squeeze out as much performance as possible. A part of my code is below, but my entire code is this snippet about 20 times...

View Article


Render to texture works on computer, but not on iphone

My problem with render textures is a rather complicated one. I have two render textures in my scene, each rendering something different and each has a perspective matrix (from the same code) applied to...

View Article

Obtain position value 6 frames before event

I have been stuck at how to make a script that would allow me to get the velocity of the player about six frames before hitting a trigger. I figured I would need an array to get the...

View Article


Don't cull objects in a certain area

In my game I need to make it so that a camera only culls an object if it is not between the camera and another object regardless of the rotation of the camera. What I essentially want is to be able to...

View Article

1000ms/frame when loading blank scene

I have this really weird problem where if I load a blank scene from a current scene, in the profiler it says that one frame passed where the editor was running at 1000ms/frame. Why would this happen...

View Article


How to create this effect in unity

Does anyone know how I might go around getting the floors of a building to have the same look as seen here? http://www.flickr.com/photos/goreckidawn/323250122/ Thanks for any help.

View Article

Game Works on Computer, but not on iPhone

Ok, I have been working incredibly hard on getting a script to work. This script however uses a depth mask shader. This shader works fine on the computer, but when I export it to the iPhone, the iPhone...

View Article
Browsing latest articles
Browse All 38 View Live


Latest Images