Ignoring collision on parent but not children
I've got a number of projectile rigidbodies, and a group of character controllers. These character controller colliders are used ONLY for traversing the terrain, and within the character controllers...
View ArticleHow to ignore multipy colliders by a tag?
Hi guys, I need a certain collider to ignore all colliders in my game that got the tag "ground". My very stupid idea was this: Physics.IgnoreCollision(thing.collider, gameObject.tag ==...
View ArticleHow do I call OnEnable on a CharacterController?
Hi, There is a function that I wanted to call whenever CharacterController got enable. How can I achieve this? To be more specific, when a Character do certain Animation, the Character will not be...
View ArticleHow do I make a game object freeze in the y axis when hitting a collider?
#pragma strict var Ggroup : GameObject[]; var group: GameObject[]; var moveSpeed : float = 0; var speed : float = 6; function Start () { Physics.IgnoreLayerCollision(8,9,true); Ggroup =...
View ArticleIgnore Collision for 2d Collider
I want to ignore collision between two objects for my 2D game. In 3D game, I used following statement to ignore collision public Transform target; //Middle parent joint void Start() { // to prevent...
View ArticleMissile collisions
I'm trying to launch a small missile from my gameobject but it keeps colliding with it. A theory of mine is that i need to disable the colliders on the missile at the start and change my missile launch...
View Articleignorecollision return error
Hello All, in anticipation of future collision with and object and his child, I have created this method : public bool LoadPassenger(UnitScript NewPassenger) { //we allow to reload existing passenger...
View ArticleDisable all collisions but one?
Is it possible to turn off all collisions for one object except with just one other object? I.e. I want object A to only collide with object B and nothing else in the scene. I'm looking for something...
View ArticleDoes IgnoreCollision work for OnTriggerEnter?
As in the title, if I call `IgnoreCollision()` on 2 objects and at least 1 of them has `isTrigger == true` will Unity still call `OnTriggerEnter` on (both of) them?
View ArticleHow do i get some objects to ignore collision with a specific object?
I'm making a 2D platformer, and my player can shoot projectiles. I don't want the projectiles to be able to collide with the player, have tried some different things, but can't get it to work. Can...
View ArticlePhysics2D.IgnoreLayerCollision not working?
Hi guys. So I already did a pretty intensive google search and I couldn't really find anything of good help, so here I am asking you guys if you could help me out a little. I'm also pretty new to this,...
View ArticleUnderwater Collision Problem
I have an underwater slow effect in place whenever my character goes under water. Here is the code for that:`using UnityEngine; using System.Collections; public class WaterPhysics : MonoBehaviour {...
View ArticleIgnore collision
I have a 2D top down tank game and my problem is if i shoot with the tank the bullet(Shell) collides with the tanks hull, the shooting is based on a cloning system which clones the Shell takes the...
View ArticleHow Physics.IgnoreCollision works?
Even at http://docs.unity3d.com/ScriptReference/Physics.IgnoreCollision.html I couldnt find the answer to my "point of view" of this question. When I use Physics.IgnoreCollision, that means my object A...
View ArticleIgnore collision problem.
Hi. I want to tell a gameobject to ignore collision with all gameobjects which has "Enemy" tag. But I get this error: BCE0019: 'collider2D' is not a member of 'UnityEngine.GameObject[]'. Script:...
View ArticleHaving trouble with Physics.IgnoreCollision().
I was trying to use http://docs.unity3d.com/ScriptReference/Physics.IgnoreCollision.html but i'm currently having problems. Right now what i'm trying to do is give a certain object permissions to go...
View ArticleTurn off ignoreCollision
hi. i use the command Physics.IgnoreCollision in my script. an object is turned to ignore the collision at a specific time. but i want the collision to turn on again after a few secounds. what would...
View ArticlePhysics.ignoreCollision and Animations: Not playing nicely together
Hi, So, here's the problem. I have a gameObject with a couple of colliders attached that is set to ignore collision with a set of other gameObjects (with their own colliders). The collision ignore is...
View ArticleObjects not move when out of camera
this objects use rigibody and move wiht fusion rigidbody.AddForce(Vector3.left * 400); and void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "enemy")...
View ArticleInstantiated Projectile IgnoreCollision Error
I have a basic turret that fires at an enemy. Everything is working fine, except that my Physics.IgnoreCollision() call is generating an error about my colliders not being active. the code looks like...
View Article