Quantcast
Channel: Latest Questions by aosome23
Browsing all 64 articles
Browse latest View live

How do I detect ONLY keypad input

I would like to make a if statement where if only the keypad Numbers are pressed. ie: if(Input.GetKeyDown(KeyCode.Keypad)) If there is none for any numpad input, do I have to do?...

View Article



How to create a HUD from an object

I want to create an HUD that requires me to use an game object instead of the regular Unity HUD. Something Like this:...

View Article

Add force in the camera direction??

I want to addforce in the direction that the camera is facing. The only problem is that the camera is slightly pointing down. So if I go backwards, the ball starts the float a little. I am currently...

View Article

Turn off child's ParticleEmitter.emit

How do you turn off particleemitter.emit in a child object? I've tried private var emition : Component[] = GetComponentsInChildren(ParticleEmitter); for(var e : ParticleEmitter in emition){ e.emit =...

View Article

Collider not Colliding with rigidbody

I have attached an collider to an gameObject called laser. The gameObject has an script that uses transform.position and makes it move transform.foward... When I shoot that laser (Instantiating it) the...

View Article


A problem with an object following a player and camera?

So there is a player and a droid and a camera in the scene. The player is moved with fixed update (because it has physics) The camera is moving with lateupdate (Using transform.position of the player...

View Article

Make waves like in Battlefield 4

I want to make a game with an cool ocean. However, I do not know how to approach this. I think the way is to use procedural mesh or preanimated object in a 3ed software like blender. If it were you,...

View Article

Store Multiple values in one variable

Is there a way to store multiple values in one variable? For example, there is a variable named sample. And var sample equals to an int of 5 and also an Boolean of true. i.e. var sample = new (int 5,...

View Article


Finding a value in a List

I need to find a value in a List. This is an example code that shows what I would want to do. private List spaces; private gridSize = 2.5; public struct Space{ public Vector3 coor; public Vector3 pos;...

View Article


How to use dot product return value

So, is there anyway to make the dot product change linearly? What I mean by this is when the angle is 45 degrees, I want it to be 0.5 instead of 0.7071 as you can see in this image: ![alt text][1] [1]:...

View Article

Is unity magnitude in km/h or m/s?

The tittle says it all. If you debug.log(rigidbody.velocity.magnitude), do you get this is km/h or m/s if 1 unity unit is 1 meter.

View Article

A list in a class... Am I doing it wrong??

Hello guys! So This is a code from part of my script. So my question is, I created a class which contains vector3s floats and a list and for some weird reason, I assign a list to the class object...

View Article

How to use Inheritance and Constructors in Unity

I have a difficult time trying to implement inheritance and constructors in unity. Are there any examples that use this ideas? I am asking this because I have a hard time scripting in unity while I...

View Article


How does the districts painting work in cities skyline?

This is an example of what I am trying to ask So to be specific, here is the questions that I want to ask -How does the brushed area work? -How does the boarder of the painted area work? -How is the...

View Article

Where to start learning about shaders and GPU programming

Where can I start to learn about shaders, gpu programming and graphics processing terms? I have tried to search on google but I have no idea where to start(I don't know what to search for). I did find...

View Article


How does unity draw out Debug.DrawLine?

Does unity use line render to draw these lines? Or does it use something else... If it does use something else, what is it? and which one is faster? Thanks

View Article

Custom Editor, variables declared in custom editor script resets

When creating a variable in a class that extends Editor, the variables are not serialized and it resets back to the default values. In this case, I want to display a enum in the inspector that is...

View Article


Custom Editor, drop down similar to shader menu

Is there a way to have a drop down menu like the shader menu where there are categories and subcategories? (Seen in the image below) ![alt text][1] EDIT: Or, is there some way to indent in the popup...

View Article

What is EditorPrefs in general?

I have read the documentation but all it says is Stores and accesses Unity editor preferences. but what exactly does it store? I dont get it...

View Article

Scriptable Object and Polymorphism

So I have a scriptable object which has a list of BaseClass. However, there are other classes that I wrote which inherits from the BaseClass. So I decided to use Polymorphism and shove everything in...

View Article
Browsing all 64 articles
Browse latest View live


Latest Images

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