article thumbnail

Collision detection & Collision ignore

Cocos

can anyone tell me how to detect collision in cocos creator and how I can ignore the collision between two rigid bodies? kindly describe with an example. thanks in advance I am using version 3.7.2.

article thumbnail

Collision detection & Collision ignore

Cocos

Go to Project Settings → Physics → Collision Matrix There, you can create groups and assign which group interact/ignore with which group. Then, in your node’s collider, assign the desired group for it. I’d suggest you to please read documentation and tutorials first and read them alot. Just my two cents and enjoy coding!

Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Physics Collision with non dynamic types

Cocos

I’ve tried changing the type (static/kinematic/animated) of the other objects, but collision detection still doesn’t work. The only time collision is detected is when I set the “Character” object’s Rigidbody2D type to “dynamic”. However, this causes the “Character” object to be affected by gravity, which I don’t want. normalize().multiplyScalar(this.speed);

article thumbnail

Physics Collision with non dynamic types

Cocos

I’ve tried changing the type (static/kinematic/animated) of the other objects, but collision detection still doesn’t work. The only time collision is detected is when I set the “Character” object’s Rigidbody2D type to. However, the “Character” object doesn’t collide with other objects that have a Rigidbody2D and a Collider2D attached.

article thumbnail

Physics Collision with non dynamic types

Cocos

I’ve tried changing the type (static/kinematic/animated) of the other objects, but collision detection still doesn’t work. The only time collision is detected is when I set the “Character” object’s Rigidbody2D type to. However, the “Character” object doesn’t collide with other objects that have a Rigidbody2D and a Collider2D attached.

article thumbnail

Physics Collision with non dynamic types

Cocos

I’ve tried changing the type (static/kinematic/animated) of the other objects, but collision detection still doesn’t work. The only time collision is detected is when I set the “Character” object’s Rigidbody2D type to. However, the “Character” object doesn’t collide with other objects that have a Rigidbody2D and a Collider2D attached.

article thumbnail

Physics Collision with non dynamic types

Cocos

I’ve tried changing the type (static/kinematic/animated) of the other objects, but collision detection still doesn’t work. The only time collision is detected is when I set the “Character” object’s Rigidbody2D type to. However, the “Character” object doesn’t collide with other objects that have a Rigidbody2D and a Collider2D attached.