When the player object moves left and right, it follows, however when using a viewport the health bar does not stay with the player, instead it will lag behind. I understand why it is not following the player. Do I need to make it follow a viewport position? If so, how...
I noticed the problem gradually — at some point, I had a bug in my code that I couldn’t figure out. An object I had placed in my test room wasn’t there. Or it wasn’t drawing. Or it was drawing where it shouldn’t be, somewhere outside of the viewport. I couldn’t figure ...
How to make patrolling guard I want to make a enemy that moves back and forth, turning around when it hits a wall or edge, and then if the player is within a certain distance, the player dies. I have already coded in an object where if the player touches it the player dies. I als...
The camera is technically a separate thing from the viewport though, and what the camera sees can be scaled to the actual screen where it is being drawn, meaning you could draw everything at half size and scale up to 1080p if you wanted. It also means...