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

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 110
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 85
article thumbnail

Tiles editor progress report #3

Mircosoft Game Dev

Most of TileSet's systems (rendering, collisions, physics, navigation, …) are now using a concept of "layers" (this might be renamed). As an example, you could now define several PhysicsBodies per tile with different collision layers/masks. This allows you to customize the properties that the tiles themselves expose.

Tile 52
article thumbnail

Release candidate: Godot 3.5.1 RC 2

Mircosoft Game Dev

Navigation: Exclude disabled StaticBody collisions from NavigationMesh baking ( GH-65775 ). Physics: Hack a hot fix for Bullet's collision margin regression ( GH-64875 ). Rendering: Portals: Show RayCast debug helper ( GH-65686 ). Navigation: Fix NavigationObstacle nodes not registering to default navigation map ( GH-64372 ).

Render 52