Quantcast
Browsing all 94 articles
Browse latest View live

NavMesh.SamplePosition returns (Infinity, Infinity, Infinity)

What am I doing Wrong? var circleRadius : float = 20; var navHit : NavMeshHit; var navLayer : int = NavMesh.GetNavMeshLayerFromName("Default"); NavMesh.SamplePosition(transform.position, navHit,...

View Article


Use Legacy animation in Mecanim

Hi, Is it possible to use legacy animations in Mecanim? I have some models set a legacy and I have some legacy animations, I changed them all to humanoid but the animations are slightly messed up, one...

View Article


Resize array in script not changing in the inspector

Hi, I have around 300 arrays, and in my script they were all originally set to a size of 10, so in the inspector I've always seen the 10 slots, now I want to resize them to 20, but when I change the...

View Article

Copy Array to a Stack

Hi, Is there a simple way to copy an array to a stack at Start, so when I pop one from the stack I do not end up with a (Clone) I know "CopyTo" Copies the Stack to an existing one-dimensional Array and...

View Article

Freezing effect on camera

Hi, Anyone know how I could get a good freezing effect in the camera? A good texture I could fade in or shader, script, or something else? Cheers.

View Article


Array or List holding 3 floats, multidimensional, Jagged?

Hi, As below I have 3 arrays holding floats, 7, 7 and 4 .. What I'd like to do is make a list or array (as I know lists are faster) with all these values in one list or array, so I could call 1,1 .....

View Article

ParticleSystem.Stop or particleEmitter.enabled = false;

Hi, What the best to use ParticleSystem.Stop(); or particleEmitter.enabled = false; ? To stop a shuriken particle effect, is one more resource greedy ?

View Article

Orientate a quad to the ray cast hit.normal

Hi, what I'm trying to do is when the ray cast id fired I want to place a quad with a texture on it at the hit.point so for testing I tried Instantiate (prefab, hit.point,...

View Article


Cut hole though centre of shader on camera

Hi, Is it possible to cut/put a hole through the centre of a shader effect applied to the camera so I can see through? I purchased the Camera Filter Pack from the asset store while its on sale and I'm...

View Article


Convert root motion to Nav Mesh Agent speed

Hi, I have an enemy that uses root motion, and has a nav mesh agent, how would I covert the root motion to nav mesh agent speed? Is it possible? Or should I be doing it another way? Thanks.

View Article

Find ALL game objects containing the same scrip

Hi, Is it possible to find ALL game objects containing the same script in my project, or does anyone know of a pug in ? The reason I ask is over the years if created so many scripts and I'm sure some...

View Article

Get hit direction from one gameObject hitting another

If I fire a gun (bullet) I use a ray cast (Ray.direction) to get the direction the ray was hitting the rigid body to add force. impactTarget = hit.rigidbody; impact = ray.direction * 12; I then add...

View Article

Deformation shader

Hi, I'm after a mobile deformation shader, what I have is an egg and I want to animate it with a deform shader to give the elusion of something trying to break out, anyone know of one please? Thanks.

View Article


Access protected class from other script.

Hi, I'm using some script for one of my own projects from UFPS and would like to know how I would access the Inflictor below from another script with C, as I'm .js I'm not to sure with this, thanks....

View Article

OnBecameVisible() .. GetComponent(ScriptName)

Hi, I have a simple script (below) that I attach to EVERY enemy in the game to tell me if they are visible or not, the script is attached to each of the LOD renderer on each enemy. My problem is...

View Article


Anyone brought from TurboSquid?

Hi, Has anyone purchased any models from TurboSquid and used them in Unity? The reason I ask is on their site it states included formats on the right, 3DS, OBJ, Autodesk FBX .. ect but I've noticed the...

View Article

Check if transform is moving backwards

I'm trying to detect when a transform with a nav mesh agent attached without ridged body is moving backwards so I can apply an animation. When the player with a nav mesh obstacle attached comes close...

View Article


Bloom effect around a GUI texture

Hi, I have a health bar at the top of the screen that goes up and down depending on the health of the player. GUI.DrawTexture(Rect(Screen.width / 2 - 150, Screen.height - Screen.height + 30, adjust,...

View Article

Freeze child from moving up / down

Hi, I have a cube child of my camera 1 unit in front, what I'd like to do is stop the cube moving up/down when I look up/down but I want the cube to rotate around with the camera when I look around,...

View Article

Vector3.Lerp() moving in 1 frame

Why does this not work ? var dogOldPos = new Vector3(); var dogNewPos = new Vector3(); dogOldPos = (Camera.main.transform.position + Camera.main.transform.forward * 0.2 + -Camera.main.transform.up *...

View Article
Browsing all 94 articles
Browse latest View live