Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Search the Community

Showing results for tags 'collider'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GENERAL
    • Introduce yourself
    • Discussions
    • Showcase
    • Need help?
    • Seeking team members?
    • Offtopic
  • RESOURCES
    • Example Projects
    • Scripts
    • Shaders
    • Unity Tutorials
    • FPS Kit Tutorials
    • 3D models
    • Animated 3D Models
    • Graphic design
    • Textures
    • Sounds
    • Other
  • SELL | REQUEST
    • Sell
    • Request
  • Mars' Modular Multiplayer Photon FPS Kit's Topics
  • Mars' Modular Multiplayer Photon FPS Kit's Reviews
  • Mars' Modular Multiplayer Photon FPS Kit's Updates
  • Mars' Modular Multiplayer Photon FPS Kit's Tutorials
  • Busy People's Introductions
  • Photon's Tutorials
  • Photon's Photon General
  • Photon's Showcase

Categories

  • Free Projects
  • Free Assets
  • Game Demos
  • Photon's Files

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


YouTube URL


Facebook URL


Twitter URL


IndieGoGo URL


Kickstarter URL


IndieDB URL


GreenLight URL


Location:


Interests

Found 7 results

  1. So i am new to unity and i found this FPS-Kit to be really usefull. Sadly i runned into a strange bug that i got rid of but i do not know why. I added some Zombies into the Kit. Then i added Colliders to all bullets to make the Zombies die when get hit. My ZombieScript: ------------------------------------------------------------------------------------------------------- var target: Transform; var health:float = 90; var navComponent: UnityEngine.AI.NavMeshAgent; var anim: Animator; var followDistance: float; // the distance in which to follow the player var minDistance: float; var attackDistance: float; var deadd: int = 0; private var healthScript: HealthScript; function Start() { target = GameObject.FindWithTag("Player").transform; navComponent = this.transform.GetComponent(UnityEngine.AI.NavMeshAgent); anim = GetComponent("Animator"); anim.SetBool("Attack", false); } function Update() { if (deadd == 0){ if (target) { var distanceToTarget = Vector3.Distance(transform.position, target.transform.position); if (distanceToTarget <= followDistance) { if (distanceToTarget <= attackDistance) { anim.SetBool("Attack", true); } else { anim.SetBool("Attack", false); } if (distanceToTarget >= minDistance) { anim.SetBool("Stay", false); navComponent.Resume(); navComponent.SetDestination(target.position); anim.SetFloat("speed", 1); }else { navComponent.Stop(); } } else { anim.SetBool("Stay", true); navComponent.Stop(); } } } } function OnTriggerEnter (col: Collider) { if (col.gameObject.tag == "Projectile") { deadd = 69; navComponent.Stop(); yield WaitForSeconds(0.1); anim.SetBool("Die", true); yield WaitForSeconds(1.12); Destroy(gameObject); } if (col.gameObject.tag == "Player") { healthScript = gameObject.Find("Player").GetComponent(HealthScript); healthScript.Die(); } } -------------------------------------------------------------------------------------------------------- Working fine like 90% of the time. But sometimes after i hit a Zombie the game "Pauses" and i get the following error: MissingReferenceException: The object of type 'SphereCollider' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. ZombieBH+$OnTriggerEnter$69+$.MoveNext () (at Assets/ZombieBH.js:74) UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17) After that i can hit the Pause Button and the game goes on. I only testet this on my m4. I don't use the other weapons in the game atm beside the rpg. Not sure if that happens on rpg too, could not reproduce it as fast as on the m4. I added a "Sphere Collider" on my particle_body as as far as i know this is the part that hits the zombie first. I did not modyfiy the Destroy After Script. But i added colliders to a lot of things to test what exactly kills my zombie. Perhaps i forgot to remove a collider from one object but i could not find anything else with a collider beside particle_untagged. --- I removed the collider from the particle_untagged and as for now the bug stopped to appear. Was the Collider at particle_untagged the reason for my bug? And why? I didn't noticed that when i fire a weapon a particle_untagged appears in my Hierarchy. So i thought this does not have an impact? I'd love to know if this was the reason for my Bug, and if i can improve my Zombie Script. Sorry for my really bad englisch, i am from Germany. Anyway, thank you
  2. I ran into bug that i have no idea how to fix... The ship is moving up and down. My player is glitching through upper collider when it goes up as you see in this preview: https://gyazo.com/e57b5cc9007d619064a7c9b06d75c242 These are two colliders on my ship model. The bottom one is for buoyancy and the upper one is for player to walk on the ship. Could someone please help me? Thanks! https://gyazo.com/90a13dbf8e30b3d1fc299b87570f6f1e
  3. the photo in blender is just after i modeled it the photo in unity with the messed up mesh collider is after i exported it, the last photo is what i want it to look like. someone please explain why it does this or at least what i'm doing wrong, ignore the last one only showing the blue lines
  4. This script will let you switch scenes by pressing on a Collider. Download How to use. ------------ 1. Make a GameObject in your scene. 2. Create a Collider on that GameObject. 3. Make sure that the GameObject is on the Camera. 4. Copy the Menu Script on the GameObject. 5. Save the Scene and create a new Scene. 6. Save both Scenes give it a name. 7. Add the both Scenes to the Build. 8. Go to the first scene where you created the GameObject and select the GameObject. 9. When selected go to the Inpector and you can write the other scene name you want to load. 10. THAT'S IT!! ------------
  5. Hi everyone, I have a scene where the player can move and rotate a cube by touch. So the player can touch anywhere one the screen and move the cube but I wanna make a collider where the cube can go through. What is the best way to do that?
  6. In my game I am attempting to do a simple parkour system. This system includes a rectangular detection collider in front of the player, and that is a trigger. When the game detects that the trigger hits something, then the game shoots out a raycast to see if the object is short enough to climb over. For some reason, the trigger only detects collisions that is the right size, that is, not an object too short, and not an object that is too tall. Is there a way to fix this? Here is a picture of a 'just right' size object of which the game can actually detect: Here is one of an object that is too tall: And similar outcomes appear for objects that are short, like the one to the left of the green cube in the 'just right' picture. I sadly cannot upload a screenshot of that because of UA's restrictions. Here is the script that I am using for the 'detected' variable: #pragma strict var detected : boolean = false; function OnTriggerStay(other : Collider){ if(other.gameObject.tag != "Player" && other.gameObject.tag != "NPC"){ detected = true; } } function OnTriggerExit(other : Collider){ if(other.gameObject.tag != "Player" && other.gameObject.tag != "NPC"){ detected = false; } } Any help is appreciated, -william9518
  7. I have a problem with triggers. when the object touch the trigger the script doesn't work. Trigger = Cube with Mesh Collider and TriggerMode = on Object to collide = My .fbx model with normal Mesh Collider Script: function OnTriggerEnter () { Application.LoadLevel(2); } --------------------------------------- I'm sure i did something wrong on Colliders but not in the script.
×
×
  • Create New...