Answer by Matt Downey
This guy has made some epic code: http://forum.unity3d.com/threads/61133-Motion-blur-for-Unity-3 Here's his demo: http://vimeo.com/10287910
View ArticleAnswer by Matt Downey
Check the y-coordinate of P1 and P2, if P1 is below P2 (lower altitude) Physics.CapsuleCast WILL work. If not, everything will go to hell....
View ArticleAnswer by Matt Downey
Go to the tab "edit"-->"project settings"-->"physics" and look at the "min penetration for penalty" variable. If that variable is 0.05, then that is precisely the behavior the Unity3d dev team...
View ArticleAnswer by Matt Downey
What you are looking for is the Dot product. You want to disable movement when the player is inside a wall, so if(Vector3.Dot(velocity,hit.normal) < -0.1) velocity = Vector3.zero; //when you get...
View ArticleAnswer by Matt Downey
First something that might give you a little insight. Physics.SphereCast will return false if the imaginary sphere starts its "sweep" while already inside of an object. Basically, you can think of...
View ArticleAnswer by Matt Downey
First off, that code is indeed in a script attached to the wall right? I would do it the other way around (attach the script to the cannon ball, which then finds a "wall" tag on collision), but it...
View ArticleAnswer by Matt Downey
I'm always late in answering questions on Unityanswers, but... function Pace (normal : Vector3, vect : Vector3) { //By dot product/negative inverse, this is orthogonal to the normal var right : Vector3...
View ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 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 ArticleAnswer by Matt-Downey
This guy has made some epic code: http://forum.unity3d.com/threads/61133-Motion-blur-for-Unity-3 Here's his demo: http://vimeo.com/10287910
View ArticleAnswer by Matt-Downey
Check the y-coordinate of P1 and P2, if P1 is below P2 (lower altitude) Physics.CapsuleCast WILL work. If not, everything will go to hell....
View ArticleAnswer by Matt-Downey
Go to the tab "edit"-->"project settings"-->"physics" and look at the "min penetration for penalty" variable. If that variable is 0.05, then that is precisely the behavior the Unity3d dev team...
View ArticleAnswer by Matt-Downey
What you are looking for is the Dot product. You want to disable movement when the player is inside a wall, so if(Vector3.Dot(velocity,hit.normal) < -0.1) velocity = Vector3.zero; //when you get...
View ArticleAnswer by Matt-Downey
First something that might give you a little insight. Physics.SphereCast will return false if the imaginary sphere starts its "sweep" while already inside of an object. Basically, you can think of...
View ArticleAnswer by Matt-Downey
First off, that code is indeed in a script attached to the wall right? I would do it the other way around (attach the script to the cannon ball, which then finds a "wall" tag on collision), but it...
View ArticleAnswer by Matt-Downey
I'm always late in answering questions on Unityanswers, but... function Pace (normal : Vector3, vect : Vector3) { //By dot product/negative inverse, this is orthogonal to the normal var right : Vector3...
View Article