Apple Game Frameworks and Technologies: Chapter 10, collision boxes

Hello, after finishing chapter 10 (Configure Physics Bodies…), I noticed the following collision boxes for “edge” assets (e.g.: upper_left_edge, upper_right_edge, etc):

This way the character can’t approach corners. I’m not sure if I copied something wrong or if this is actually the expected behavior. ¯_(ツ)_/¯

Please advise, thanks.

1 Like

Hi, Fernando.

You did not miss a step; this behavior is by design to help keep things simplified and focused on adding the physics bodies. That said, you can certainly adjust the physics bodies to be more precise to the underlying asset, which might be worth doing in a production environment. It really all depends on the asset and the game’s design whether or not that level of detail is even required. In other words, how precise does it need to be?

Thanks for asking the question, though. I think it might make sense to add a note about this so that other readers won’t feel like they’ve missed a step.

2 Likes

Ah, got it. Yeah, that’s fine IMO. I think the chapter already covers a lot. It may be better to keep it simple indeed. Maybe a note like you mentioned is enough. :+1:t2:

Yeah, it wasn’t easy deciding how much to include and what to cut. I could have gone on for another 200+ pages. heh heh.

1 Like