Defold packman

hi all,
I just started using unfold as I wanted to get started in games design. I’ve been working through it and found it okay. however, when it came to testing the collisions the ball bounces off where it spawns. does anyone know how to make a collision object move with the sprite

I suggest you look at the physics manual.

Probably you have your collision component’s type set to “dynamic”, which means it’s controlled by the physics simulation and you can only affect it by applying forces.

If you switch it to “kinematic” or “trigger”, then you will be able to set its position like a normal game object. (“kinematic” will push around other objects and give you more info about collisions, “triggers” are insubstantial and will just give you enter/exit events.)

You may also not need physics at all, if you are moving within a grid. I’m pretty sure the original Pacman did not have Box2D. :stuck_out_tongue:

3 Likes

okay, thanks for this, i will check the manual and make sure everything works after that