article thumbnail

Physic 2d - how to handle collision?

Cocos

Here’s my settings for Player: For Weapon (it’s the child node of the Player’s node): Here’s the video demo for you (click on screen will make the player (Square) move together with the weapon (circle). but it will not go thru wall): /uploads/default/original/3X/e/6/e6b48400d02908310dc438e9d587ac22c0f81587.mov

article thumbnail

Handle the collision of sprites

Cocos

best way to debug this kind of bugs is to activate physic debugging, add this to your code. onLoad() { PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb | EPhysics2DDrawFlags.Pair | EPhysics2DDrawFlags.CenterOfMass | EPhysics2DDrawFlags.Joint | EPhysics2DDrawFlags.Shape; }

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

You can add breakpoints in the two functions, node.destroy and node.setParent , and then observe through debugging whether these functions are being executed, and also check if the node that is being operated on is the one you expect.

article thumbnail

Dev snapshot: Godot 4.0 beta 12

Mircosoft Game Dev

Physics fixes and improvements for sphere-capsule, sphere-box, sphere-cylinder, and capsule-cylinder collisions ( GH-70660 , GH-70787 ). Export: Fix missing "debug"/"release" export presets feature tags ( GH-71274 ). Physics: Fix sphere-capsule collision logic ( GH-70660 ). See the list below.

Beta 106
article thumbnail

Developer Shares Building Fabrics, Ropes, And Soft Bodies

Cocos

Most of the implementations are Unity, but the principles are the same, and a lot has been learned in handling and debugging. In fact, this is very widely used in games. The most awesome case I’ve seen from the big guys is a 3D fabric that interacts with 3D objects like a real piece of fabric.

Build 98
article thumbnail

Dev snapshot: Godot 4.0 beta 12

Mircosoft Game Dev

Physics fixes and improvements for sphere-capsule, sphere-box, sphere-cylinder, and capsule-cylinder collisions ( GH-70660 , GH-70787 ). Export: Fix missing “debug”/”release” export presets feature tags ( GH-71274 ). Physics: Fix sphere-capsule collision logic ( GH-70660 ). New NavigationServer performance monitor ( GH-70731 ).

Beta 81
article thumbnail

Maintenance release: Godot 2.1.4

Mircosoft Game Dev

A big thankyou to all the contributors who worked on this release by implementing bug fixes or features, or testing the changes to spot potential regressions and help debug issues. Debugging: Many improvements to the editor's debugger and display of complex types. Physics: Add one-way collision to tile-set/tile-map. Highlights.

Tile 52