collision mask

  1. wilmer

    GMS 2.3+ Is it possible to scale a sprite that is used as a collision mask on an Object from code?

    Hello everybody: I have the object of my Character and assign as a collision mask a sprite that measures almost the same as my character, but there is an animation where my character must crouch (I do not know if it is the most recommended), in this case I would need the sprite of collision...
  2. atma505

    GMS 2.3+ Precise collision mask not working

    So I'm making a side-scrolling platformer and I've got a Submarine object that I want the player to be able to walk on top of. I'm using a precise collision mask because it's a complex shape and I want the player to be able to walk up/down its slopes and bump into its rudder and conning tower...
  3. TheOnlyWRT

    Rotate a sprite without rotating its collision mask

    Hello! So I am working on a platformer where the player can roll. I have been coding the rolling motion by moving at a certain speed over a given distance and rotating the sprite using image_angle. However, with gravity, the player gets stuck in the floor. I realized that this is because using...
  4. André Guilherme

    GML How to create collision shape for a line that the player is drawing?

    Hi everyone! I'm making a game using physics in which the player can draw a line that functions as the ground. I can already draw the line, but I'm having trouble setting up its collision shape, and the ball never collides with it! (see image) Here's my code! When the player holds the left...
  5. P

    GMS 2 Accessing Sprite / Mask As Vertices

    I'm currently trying to improve my project's implementation of shadow projections. Currently, the lighting system is very rudimentary, and works as follows: 1. Render a surface and populate it using all light-creating objects' lighting sprites 2. Calculate the projection of all shadow-casting...
  6. Robzoid

    [SOLVED] Is there a problem with image_xscale?

    I'm working on slopes and they're very sensitive to collision mask changes. I'm getting stuck in the slope when my player object turns around (i.e. when its image_xscale value goes from 1 to -1). I determined that the collision mask is shifting by 1 pixel when the sprite flips but it's not...
  7. L

    Rotating a sprite without the collision mask

    Hi. I am trying to let my player object jump with a somersault... but everytime i jump next to a wall the player gets stuck. when the player isnt rotating, he doesnt get stuck. I think it is connected to the collision mask. how can i rotate a sprite without letting the collision mask rotate too?
  8. M

    Question - IDE How to specify arbitrary collision masks?

    Game Maker's internal implementation of "precise" collision masks is that it generates a 2D bitmap stored along with the sprite. These are bitshifted and ANDed together at runtime to check whether there is a hit. Is there a way to specify an arbitrary 2D collision bitmap for a sprite rather...
  9. lukbebalduke

    GML Getting information about Collision Mask Type

    Hey there! I would like to know if there is a way of getting information about the collision mask type of a given sprite. Either if it is rectangle, diamond, circle etc... Thanks in advance!
  10. F

    Can I set different things to happen depending on how much two objects colide?

    So I have two clouds, one player cloud and one enemy cloud. What I want is, if I hit the enemy cloud, I die, but if I only scratch the enemy cloud with my player cloud, I charge with electricity. Is there a way to have these different conditions happen based on how much the collision boxes...
  11. loi777

    [SOLVED]Resizing object does not resize mask

    It's simple, when I resize an object it's mask does not resize with it making an giant sprite but small collision mask. There's a command or anything that I can do to fix this?
  12. I

    [Solved] Collision Mask Acting Weirdly

    I am having an issue with my collision masks. Everything was working fine until I added code to make the game scale based on the screens resolution. I have a post-draw event that has the following code: draw_surface_ext(application_surface, XOffset, YOffset, Mult, Mult, 0, c_white, 1); I'm...
  13. Gasil

    Windows Damage cooldown (invincible for a few secs) for enemies.

    Hello everybody. I seek your advice. I'm setting up a meele attack on a top down shooter, an attack I want to be able to hit every enemy that collides with its collision mask. However, as you guessed, an enemy of 10 hp dies instantly on a meele attack of 1 damage because the collision...
  14. S

    GMS 2 Multiple collisions with collision line[SOLVED]

    I'm having trouble with multiple collisions using perfect collisions. The problem that occurs with: //Single collision but only performs the damage state once var cc = collision_line(x, y, kx, ky, obj_elifeparent, false, true); if (cc && can_hit == true){ cc.hp -=damage...
  15. H

    New sprite wont move

    So i made a new payer sprite, but now the code that is used to move the player wont react, it also seems that the player is wedged with the floor for some reason...
  16. T

    GMS 2 Help with DRAW GUI event creating object instances

    Hi All, This is my first post and first of all sorry for my english it is not my mother tongue so I will explain myself as better as I can (and of course thanks for reading this). I am creating a tower defense game but I am facing some strange behaviours that I could find neither internet or...
  17. S

    GMS 2 [SOLVED] Collisions with a spriteless object

    I have 2 objects: obj_player, and obj_pickup. obj_pickup is a spriteless object that I assign a sprite to in the objects creation code in the room. In this tutorial , it has just that: a spriteless object that is assigned a sprite later on in the creation code. That way, one object can be used...
  18. S

    GMS 2 [SOLVED] Change collision mask facing

    Evening all, I think this should be simple but not having much luck with it! I have added a sprite as my collision mask but it looks like the issue is that the mask doesn't change facing (it has an offset). I have avoided using image_scale which I believe would work in this instance. So, is...
  19. M

    Help with Collision Masks

    Hello all, I need some help with Collision Masks. I created a sprite and converted it into a tileset. I then placed the mask around the borders of my map to create a collision mask. My problem is when I move my Character (object) to test, it interacts with the mask but seems to act funny and...
  20. Skull_k

    GMS 2 Collision with one object precise and one not-precise

    Hi, I use IDE V2.1.0.212 and run time 2.1.0.136. In GMS2 manual, we can find the following sentence with the picture for place_meeting : "This will work for precise collisions, but only if both the instance and the object being checked for have precise collision masks selected otherwise only...
Top