Happy Friday everyone. So I’m a bit foggy on modifying the collision box for my ground platform. I found the documentation on the site for adjusting the collision box but I would like to understand it more so I don’t keep putting random numbers in hoping it works. With the code below, I know that the setSize method adjusts the body but I don’t think I fully understand each value. Also setting body.velocity.x and body.immovable, is that part of the modified collision box?
// This adjusts the collision body size to be a 100x50 box. // 50, 25 is the X and Y offset of the newly sized box. sprite1.body.setSize(100, 50, 50, 25); sprite1.body.immovable = true; sprite2.body.velocity.x = -100;