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

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.

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. However, the “Character” object doesn’t collide with other objects that have a Rigidbody2D and a Collider2D attached.

article thumbnail

Prefabs with polygonCollider returning wrong collision normal

Cocos

= null) { console.log(z.getWorldManifold()); this.socket.send(“Collision”, { collisionVecs: { x: z.getWorldManifold().normal.x, Because of this, the impulse I am applying on them at contact point is in same direction which is making them move in same direction after collision. y: z.getWorldManifold().normal.y,

article thumbnail

Bullet Physics Unity: Movement and Collision detection

Game Development for Beginners

When it comes to implementing bullet physics in Unity, understanding how to efficiently spawn and control bullet movement, as well as handle collisions with fast-moving objects, becomes crucial. In this article, we will see, how to implement bullet physics, ensuring their smooth movement and accurate collision detection. Read more

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.