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”. This is the line of code I’m using to move the Character. const movement = new Vec2(x,y).normalize().multiplyScalar(this.speed);

article thumbnail

Nearing the Finish Line: Rewriting the Untold Engine

Harold Serrano

After months of coding, tweaking, and testing, I’m thrilled to share that the rewrite is almost done. This modular approach keeps everything clean and efficient, allowing developers to focus on their game logic instead of wrestling with tangled code. Want collision? Want to add physics? setEntityKinetics(). setEntityCollision().

Engine 69
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

Destoying from scene shows all children deleted, but still childrens are visible in scene on collision. on colllision

Cocos

Destoying from scene shows all children deleted, but still childrens are visible in scene on collision : - On collision with the saw, this is happening : - onLoad() { this.animationComponent = this.node.getComponent(Animation); this.animationComponent.clips[0].name What’s happening wrong with the collision detection code?

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. Just my two cents and enjoy coding! Just my two cents and enjoy coding! Then, in your node’s collider, assign the desired group for it.

article thumbnail

Handle the collision of sprites

Cocos

I’m trying to handle the collision of two sprites, i added BoxCollider2D to the sprites. code for the "character ". code for the “key”. code for the "character ". code for the “key”. code for the "character ". code for the “key”. start () {. this.collider.on(Contact2DType.BEGIN_CONTACT, destroyKey(){.

article thumbnail

Creative Ways to Teach Applied Math to Kids

Real Programming

Even kids as young as seven can start to learn concepts that coding and mathematics share, such as vectors, integers, and even some trigonometry! It’s impossible for kids to learn coding without learning math. They’re meant to introduce them to basic math and coding concepts, but we apply the lessons by making math fun.

article thumbnail

Developer Shares Building Fabrics, Ropes, And Soft Bodies

Cocos

or better : with 3D scenes Origins Two days ago, I saw a fun effect: The article was: Dazzling HTML5 Front End Design Source Code Analysis Notes - Remnant Clothes Effect Example: Tearable Grid It is an effect that I’ve seen before and recently brushed up on. So I researched the code and prepared to port it to Cocos.

Build 98