theykeeponrising / dead_binary

Creative Commons Zero v1.0 Universal
0 stars 1 forks source link

Simplified camera movement parameters. #307

Closed bvas89 closed 1 year ago

bvas89 commented 1 year ago

Pics posted in Discord

Using the Frustum wouldn't work (move the camera) after rotating the camera. I instead replaced it to check for a point on the Top 3rd on the screen. If that point contains a GridMap tile, the camera may move. We could even make this a Tile Layer for the RayCast.

It sometimes gets stuck on parts of the level with empty or no tiles, but that can be fixed in level design.

The original frustum controls are commented out in case someone with more experience wants to do a deeper dive. But this works well enough.