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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer by Matt Downey
Your problem might be solved by: GL.SetRevertBackfacing(true); There are still major problems with lighting (only ambient and non-realtime light will work).
View ArticleAnswer by Matt Downey
Figured it out! (at least for myself). What I did: Go to whatever graphics card control system you have (for me it's the **NVIDIA control panel**). After that you have to go to the **Program Settings...
View ArticleAnswer by Matt Downey
A good way to do this would be to collide if Vector3.Dot (or Vector2.Dot) of Player.velocity && rayInfo.normal (for a simple raycast) is less than 0. In order for this to work you need to go...
View ArticleAnswer by Matt Downey
Almost positive I know your issue. I think you need to use cannon.transform.rotation (not local rotation) and cannon.InverseTransformDirection instead of Transform Direction for these two lines:...
View ArticleAnswer by Matt Downey
I think the best thing for a 2D game would be to add a particle effect to simulate a glowing aura. http://unity3d.com/support/documentation/Manual/Particle%20Systems.html If you were to use 3D (doesn't...
View Article