ufcaribbean.blogg.se

Gamemaker 7 zoom in example
Gamemaker 7 zoom in example












This is expected when looking at the code but i want the camera to zoom on the center of the screen.Īny tips on how to do that are welcome. The problem is that when the zoom is smaller than 1.0 all sprites are moved toward the top-left corner of the screen. Var sizeY = sprite.height * sprite.scaleY * Camera.finalScaleY Var sizeX = sprite.width * sprite.scaleX * Camera.finalScaleX To implement the scaling i changed the code to this: class Camera Var sizeY = sprite.height * sprite.scaleY // height of the sprite on the screen

gamemaker 7 zoom in example

Var sizeX = sprite.width * sprite.scaleX // width of the sprite on the screen Normally I calculate the Sprite's drawing size and position similar to this pseudo code: render() You would say Ok team 2, this is for you. Zoom Chat Idea 2: Majority Wins If your group is between 10-50 people, this could work well. As the host reveals letters, the first to solve it wins. This could be really fun with the Wheel style games. With this idea, whoever puts the right answer in the chat first wins. However, like I said my issue is the co-ordinates when zooming.I'm currently trying to implement camera scaling/zoom in my 2D Engine. Zoom Chat Idea 1: First to Type In Answer. If you hover your mouse over the stage, and pan/zoom around, you'll see that the world co-ordinates don't update (If you were just to move the camera without pivot they would). I've forked your fiddle here: and added mouse cursor debug Is this to do with your "CAVEAT" above? Or are you aware of a fancy way to translate word position with the zoom factor?

gamemaker 7 zoom in example

However, when I start trying to zoom, the gameworld position doesn't update, and the road draws in the wrong place. Unlike your example here, I'm just panning with the camera, and not touching pivot. I'm successfully drawing roads and panning around the game area. Hi lewster32, I've been attempting to write a kind of SimCity game. The issue is that Phaser's body positioning does not take into account pivot correctly. Function updateLevelstatus()Įureka! This does actually work - example here:  - added some rudimentary clipping too.ĬAVEAT: Until body alignment with pivot is fixed in Phaser, this method will not work with collision.














Gamemaker 7 zoom in example