Quantcast
Channel: Latest Questions by fighder
Browsing all 38 articles
Browse latest View live

Why is spawn script set in start function?

So I was making an infinite runner and made the spawn script base on this tutorial: http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/infinite-runner Basically it tells me to...

View Article



Detect if mouse is inside an object (without OnMouseDown, etc)

I'm currently coding a gravity gun (like in half life) and it's suppose to be able drag objects base two condition: is the object inside the effective range? is the mouse clicked on the object? To...

View Article

How to add a gameobject to a null gameobject

The question may seem confusing but I can't think of another way to ask it about it. So I have a project in cloning TWO DOTS the game. So I am making a grid system and I'm trying to assign the circles...

View Article

Age of Empire Mini Map

If anyone played this game before, you know that the minimap starts out black, and only revealing areas the player has units at. Areas the player explored will maintain revealed, but a fog of war...

View Article

Extracting current state of texture as new texture

So I've been working on some shader texture related project, and I just want to know if it is possible get the current state of a texture as a new texture and then reapply the new texture back to the...

View Article


Collision with light

Trying to create a 2d stealth game where the enemy uses light to show their view range and if the player touches the light, they are detected. Normally I would use a collider that will follow the enemy...

View Article

Prevent light combining with other lights

I tried to search for this but can't find much in terms of solution. Basically I have the following: This is a picture of how the lighting looks like when the player (white circle) is away from the red...

View Article

Character looking at opposite direction of mouse

So I used the following for my 2d top down character controllers to look at the mouse, but I recently realized the code should've been wrong: mousePos =...

View Article


Third Person Camera Wall Covering Camera

Like what the title said, I made a third person controller with a third person camera. Sometimes the camera will be covered by a wall, which is troubling. I thought about making the wall either...

View Article


Converting Type to SpriteRenderer/Image/Text

Basically I am trying to make some visual effects like fading out and stuff, and I am using coroutines to run those effects. When I start the coroutine, I passed down arguments with an object[] like...

View Article

merge sort crash Unity

Basically I needed to sort a list of raycasthit base on distance, and I was gonna write my own merge sort. I tried to test the merge sort with a list of ints, and the moment i hit play, unity crashed....

View Article

Hitman Absolution Camera Study

So I am studying third person controllers, and I was studying the controller in Hitman Absolution. I notice that when moving the mouse along the x-axis, the camera itself rotates, but its position is...

View Article

True Portal Effect

So I did a small portal project from this tutorial: https://www.youtube.com/watch?v=sK9Qf8ElFHo Only problem I had is that the use of render texture is not as realistic as Portal. I am not looking to...

View Article


Changing gravity direction of player, and view.

I tried doing this thinking it shouldn't be too hard, but man am I wrong. Or maybe I am just bad. First problem, I can't use any rigidbody base rotation (add torque, moverotation, rotation, etc),...

View Article

Resizable Text Bubble

I was wondering how can I detect the area required to display a X amount of text, and resize a speech bubble in code, so whenever I need to display text, the speech bubble will automatically resize.

View Article


Odd shadow effect, help!

![alt text][1] [1]: /storage/temp/64818-capture.png Not sure how to deal with this shadow, help please!

View Article

NetworkManagerHud overlapping on build?

When I made a build of a game with networkmanger hud, the hud overlaps for some reasons, and this doesn't happen in the editor. ![alt text][1] [1]: /storage/temp/66493-overlap.png

View Article


Ontriggerstay2d only runs 26 times in a row?

So I was running some test about OnTriggerStay2D, and I realize it only runs 26 times in a row if no position changes are made between the two colliders involved. Here is the code, I can't see anything...

View Article

Google Play Service set up freezes play mode a bit

So I just set up google play services by adding in the resource from the developer console and everything seems fine. I've hit set up and opened up the profiler. Then the play button turns blue real...

View Article

Why is spawn script set in start function?

So I was making an infinite runner and made the spawn script base on this tutorial: http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/infinite-runner Basically it tells me to...

View Article
Browsing all 38 articles
Browse latest View live




Latest Images