Quantcast
Channel: Latest Questions by dustxx
Browsing latest articles
Browse All 39 View Live

When my player controller collides with a moving object it can pass through

Hi, I am using a player controller component with the FPSWalkerEnchanced script to move my character around. Everything works perfectly except when colliding with a moving object against the direction...

View Article



Is it possible to automatically match materials to textures with the same name?

I think the title pretty much sums it up, but when importing a model I ripped from a gamecube game into blender then importing that into unity, I end up with a model without textures. Apparently this...

View Article

What's the best way to snap an object into position?

Here's a picture of what I mean: http://i.imgur.com/KUfe54S.png I would like to make the top object snap into the hole below it. Is there an easy way to do this?

View Article

How do you move a rigidbody by a vector3 relative to itself?

When I try and move a rigidbody with the MovePosition(Vector3) function, it moves in the direction of that actual vector3. I want it to move by that vector3 in the direction the rigidbody is already...

View Article

Why doesn't my mesh collider collide while a capsule or cube collider works...

![alt text][1] [1]: http://i.imgur.com/yeTaZ05.png For some reason, when this object has a mesh collider attatched to it, the object falls through the floor upon startup. This doesn't happen with any...

View Article


How do you view an animator controller's current status as it applies to a...

Right now I have an animator controller that is being used by two different objects. Before, when it was only applied to one, I could see the status of various animations that were happening to that...

View Article

How do I make an action occur on the start of the NEXT step?

Right now, I have code that disables a character's controls when talking to an NPC. However, the same button they use to start talking is the same as what they use to stop talking. Obviously, they can...

View Article

Why do my serializable classes stop working when made to subclass...

So, I have a class that represents a character. It was serializable and worked perfectly fine, [here][1] is a picture of a list of them working properly. However, I had wanted to switch over from plain...

View Article


How do you use serialized values at creation?

For instance, let's say I have a class called "PlayerStats" which is attached as part of some player monobehaviour. "PlayerStats" has one int field representing maximum health. This is serialized so it...

View Article


What are the best practices for reusing an animation controller?

Let's say I have several sprite sheets of characters that look different, but all have frames for the exact same types of movement. For example, "walking up/down/left/right" and "Idle...

View Article

Why is my network view component dissapearing when an instance of the prefab...

I have a prefab with a network view component. When I create instances of it, the network view component is not created with it. Why is this? It appears to work for everyone else.

View Article

How do I sync the animation of objects instantiated at different times?

I'm making a tile-based game like pokemon and I've coded it so that tiles are only instantiated in an area around the player as the overworld is so huge if I loaded it all at once there would be a lot...

View Article

Animation Override Controllers stop working

I have a couple of animation override controllers that override a particular animation controller. Sometimes, they all simultaneously decide that the base controller has no animations to override. I...

View Article


Is there any way to automatically run an editor script when an asset is moved...

Basically, levels in my game are loaded from XML files. Each element in the XML files have a path to the resource that they load. Right now, if I move or rename an asset without adjusting the paths in...

View Article

Can you change the current folder of the project view via script?

Seems like a simple enough question. If I have a folder for prefabs like "Assets/Resources/Prefabs/Area/Tiles" and a folder for textures like "Assets/Textures/Area/Tiles" I'd like to make an editor...

View Article


Why is passing this array causing some of its values to become null?

So, I've worked in c# for a few years and I've never seen anything like this and it's got me stumped. Basically I have a generic method that returns an array. It shouldn't return any null values. In...

View Article

How can you put a serializable object in an editor window?

When you have a serializable object as a serialized field of a monobehavior the inspector automatically shows all of the object's fields with their appropriate types and lets you fill them in. Is there...

View Article


How do you save a reference to a prefab's script in a ScriptableObject?

So, I have a ScriptableObject class called "Template" that stores a reference to a script on a Prefab. You can see it here: http://i.imgur.com/qjfJ4eA.png It's the first field, the "TileMarker". That...

View Article

How can I calculate a list of points where a line intersects a grid?

I am making a somewhat unusual character controller that requires me to do some strange math. Basically, I want to use the line drawn below in red to calculate a list of the points where the line...

View Article

How can you make a Sprite Shader that properly uses the z coordinate?

Right now I am using a shader that is exactly the same as the default "Sprites/Default" shader, with the exception of ZWrite being On instead of Off. This change makes the shader accomplish most of...

View Article

Is it possible to override the "Cannot set field of view on camera with name...

So, when I try and adjust the FoV for a camera in my project at runtime I get this error: "Cannot set field of view on camera with name 'screenCamera' while VR is enabled." ---------- I understand this...

View Article

Browsing latest articles
Browse All 39 View Live




Latest Images