Quantcast
Channel: Answers by "Matt-Downey"
Browsing all 90 articles
Browse latest View live
↧

Answer by Matt-Downey

If it's first person, there should be a lot less worries than for a third person. Firstly, do you know about the camera trick where the player's gun and hand are placed in front of all other objects?...

View Article


Answer by Matt-Downey

My best guess would be to add a co-routine that is called every 1-5 seconds that sorts through the nearest objects and either enables or disables the collider based on whether or not they are within a...

View Article


Answer by Matt-Downey

I think you might be able to get this to work with fixed arrays. Usually with the javascript arrays you use float, int, string, etc (not GameObject from what I know). var arr : GameObject[]; //make a...

View Article

Answer by Matt-Downey

Assuming this is a 2.5D sidescroller, what you want to do is raycast downwards and find the normal. First I would add an empty gameObject to the scene gameObject-->create empty. Rotate this object...

View Article

Answer by Matt-Downey

that's probably because the model is rotated. In order to get this to work well, i would recommend: function Awake () //called when the arrow is instantiated, this is different than Start() {...

View Article


Answer by Matt-Downey

I think you can add the following to OnCollisionEnter: var temp0 : Vector3; var temp1 : Vector3; var temp2 : Vector3; temp0 = collision.transform.position; temp1 = transform.position; //Step1 temp2 =...

View Article

Answer by Matt-Downey

It shouldn't matter too much how many scripts you have. The thing that will kill your processor's speed is how many "Update" functions you have and the complexity of the code in those update functions....

View Article

Answer by Matt-Downey

The issue is that you are trying to redefine an already defined variable. Lets say unity has a variable transform.position, what you are essentially trying to say is private var transform.position =...

View Article


Answer by Matt-Downey

Ah, this seems to be the fault of not doing something like this instead: ball.timeToExplosion = length; Essentially, what you are doing is lacking the proper address to the variable you want to change....

View Article


Answer by Matt-Downey

Quaternions are not what you think they are. Quaternions are an odd 4D space that will never faulter when doing rotations, but as a result it has absolutely nothing to do with Eulers Angles (which you...

View Article

Answer by Matt-Downey

The problem is you are using "Left" and "Right" and a bunch of logical but nonetheless nonexistant buttons. Press Edit-->Project Settings --> Input and you can add "Left" and "Right" and so on if...

View Article

Answer by Matt-Downey

There is a function that I was referred to which is at least faster on the creator's machine: http://blog.alladvanced.net/2011/02/21/square-root-calculation-speed-in-flash-and-unity3d/ which I figured...

View Article

Answer by Matt-Downey

It's a very annoying fix, but I answered a question that should be able to fix the problem on only your pc (it has to be solved on a per-user basis):...

View Article


Answer by Matt-Downey

I'm almost positive transform.Translate is cheaper than rigidbody.MovePosition. If you use rigidbody.MovePosition, the object will sweep out the space afaik to make sure the object interacts with all...

View Article

Answer by Matt-Downey

I really dislike both of the methods because they get really whacky at larger angles, which prompted me to invent a new method a while back. Since then I've made two methods that should be better or...

View Article


Answer by Matt-Downey

Try this and attach it to the marble, so it wakes up the rigidbody: function FixedUpdate() { rigidbody.WakeUp(); } [Rigidbody.WakeUp][1]: There are settings in edit-->proj settings-->physics that...

View Article

Answer by Matt-Downey

I'm doing the exact same thing in my game. I've used a 3x3 grid and added darkness (fog) of war so the player cannot see copies of herself/himself. Here's the old [video][1]. I've since resolved a...

View Article


Answer by Matt-Downey

There are three methods for this (that I know), each of which will have similar results. The first two methods both use ***cookies*** for lights: ![picture][1]...

View Article

Answer by Matt-Downey

This is my solution. public abstract class CustomComponent : Component { public new CustomTransform transform; } public class CustomTransform { public Vector3 position { get { initialize_transform();...

View Article

Answer by Matt-Downey

In my opinion: Start() and Awake() are not equivalent to the constructor because ExecuteInEditMode + Serialization + closing/reopening Unity will result in calling Start/Awake 2+ times. I tried...

View Article
Browsing all 90 articles
Browse latest View live


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