offset

  1. O

    HTML5 HTML5 mouse coordinates are offset when browser is scrolled.

    Hi, I am having issues with an HTML5 game. The game is 800x600 and is centered in the browser window. Even though the canvas is completely within the visible region of the browser page the browser still adds scrollbars. If these move at all then the mouse coordinates in the canvas will be...
  2. Arikitaru

    [SOLVED] Cursor/Camera/Object anchor offset issue

    Hello! I'm having a weird issue with a camera/shooting feature of my game. Whenever I'm trying to shoot, the bullets are leaving from the right spot (turret), but not towards my cursor - the game thinks that the turret is about 200px higher. If I rotate my cursor around that marked spot...
  3. E

    HTML5 [SOLVED] Mouse offset ignoring centering of the canvas

    Hi all, I'm resizing and centering my game in order to keep the correct aspect ratio, which works great. Except for the mouse coordinates. It reacts correctly on the resizing part, but when I center the canvas, it suddenly starts using the whole browser window, so I have to move my mouse...
  4. V

    Windows Bug: Tile layers with offset not rendering all tiles in IDE

    If you create a tile layer and give it a negative vertical offset (ex: -12 y offset), the expected behavior is that the tile grid visible on the IDE will show a little higher, but you should still be able to paint tiles and see those tiles in every cell of the tile map grid shown while in IDE...
  5. M

    Bullet shooting problem

    Already excuse me mistakes because I'm French ;) .. My problem is that I would like to leave the bullet the end of the barrel of my weapon, but I can not position the bullet instancier with "instance_create_layer" (The bullet is positioned originally sprite and I do not want that :bash:), help...
  6. S

    HTML5 scaling problem: mask/mouse offset

    hi everyone, After following the yoyo blog scaling tutorial for html (room scaling only) --> blog/67/scaling-for-html5, I have the problem that the game scales but the buttons become "unclickable". First I thought that the button mask just stays put while the rest scales but after some research...
  7. Nathan Laing

    Legacy GM [SOLVED] On zoom, re-size/re-position surface

    Greetings all, Perhaps someone might assist me? I create a surface, its width and height the size of the view (1920x1080). I then draw a sprite to that surface, taking into account the position of the view, before finally drawing the actual surface. surface = surface_create(view_wview...
  8. dazza_bo

    Problems with Isometric tile drawing

    I took the isometric game tutorial in GM 1.4 and changed the tile sprite to a sprite that has height (rather than the flat "2D" sprite used in the tutorial) so it's obviously not going to display correctly. I know I need to take into account a y axis offset for the height of the tile but I can't...
  9. Shadowblitz16

    GMS 2 (SOLVED) changing x position not working

    does anybody know why I can't offset my player when I flip him? he flips he just doesn't change position. here is my code /// @description Link Step Event // You can write your code in this editor x = px; y = py; //Update Link Here. //Horizontal Collision hitbox_top = bbox_top //y -...
  10. H

    Newbie looking for some help with mouse controls

    Apologies if anyone has already seen me post on reddit but slow replies i figured id try here. To give some background i'm currently using offset_x = 100; if(mouse_check_button(mb_left) and (mouse_x >640)){ phy_position_x = mouse_x + offset_x; phy_position_y = mouse_y; }...
  11. Mytchall Bransgrove

    Set Sprite origin + scaling?

    Hi guys, my goal is to click somewhere on a sprite and it will set the xoffset/yoffset to this new value and translate x/y so it doesn't 'jump'. I've got most of it working but can't seem to figure out how to add to the calculation, rotation and scaling, and am after some help (must be...
  12. G

    Drag And Drop [SOLVED] My bullets aren't lining up with weapon direction/angle

    Hello guys! Maybe yall have the answer to this, I've tried a variety of things but it still doesn't work :/ [GMS2] My obstacle: I have 4 sprites trying move together at all times. Legs-Torso-Rifle-Bullet (2D side view perspective) My torso should follow/rotate wherever my mouse is located...
  13. Ayziak

    GMS 2 Some drawn sprites are offset randomly in full screen mode...

    So in a new game of mine, different clothing sprites are drawn on top on my player for the purpose of customization. I've been having issues where some (but not all) of these drawn sprites are offset weirdly. The attached picture shows this happening. Notice how the hair and knife are offset...
  14. H

    mouse_x gets offset when view_xview is increased

    Hello everyone, I have been scratching my head with this one for a while, after a couple of days of googling around and trying everything I could, I'm giving up on fixing this one alone. I have the following code running in the step event, the goal being to move the view the same way it would...
  15. T

    (Solved) GUI object offset when zooming view

    Hi, I'm somewhat new to GMS and I've been making some experiments. One of them is using Draw GUI to display an interface that you can interact with - clicking buttons, opening menus, etc. I've also added camera zoom to the mix, and that's where I'm having problems. When zooming the view in...
  16. TypicalHog

    View - dynamic offset and size

    I want the view to be affected by player's speed, here's what I have: If I floor() the values below (which I think I should) screen seems to be shaking. (Can be seen in the video) Is it OK if I leave them as a floating point number? Also, do you have any suggestions how to improve this code...
Top