• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

collision

  1. thejosving

    GameMaker Is there a way to discover the exact point where the collision happened?

    As the title says, is there any way for me to find the point, in pixels, where one object "touched" the other?
  2. Tete-chin

    GameMaker GML Visual Examples for Beginners (movement, collisions, etc.)

    GM Version: v2023.2.1.75 Target Platform: ALL Download: No download Links: N/A Warning: The audio is in Spanish but you can activate the captions with translation. It translates well. Select closed captions (cc) tool, then select settings / auto-generate / language choice. First lesson: How...
  3. M

    How do you update a variable only once when two objects collide?

    Hopefully someone can help me. I get a problem when I try to update a variable when two objects collide. The integer variable just keeps on getting bigger because the two objects are continuously colliding as they pass through one another. Is there and easy way to stop this, without removing...
  4. CardinalCoder64

    GML Guide to Basic Slopes Using Linear Math and Geometry (Object-Oriented, Top-Down)

    GM Version: 2022.1+ Target Platform: All Download: N/A Links: Basic Slopes + PPOBC* Projects (GitHub) *Pixel-Perfect Object-Based Collision. Learn more. Summary: In this guide, you will learn how to implement basic object-oriented slopes in a 2D top-down game* using linear math/equations and...
  5. Dimsum Cart Studio

    GML About Instance Rebound.

    I want to make a ball to hit the enemise ( reducing enemy hp ) and walls around and rebound. So I use move_bound_solid() and collision_circle(). But sometimes the ball hit the enemy and rebound withou reducing the enemy's HP. And I have make the radius very much bigger the the ball is. It seems...
  6. D

    GameMaker How do I separate Damage Collisions & Movement Collisions?

    Hello everyone, I am working on a Top-down shooter game and I ran into a weird issue regarding my bullet collision systems. I'm using GameMaker's Pathfinding code to move my enemies along a grid. I adjusted their collision mask sprite to be a small diamond because they were having issues going...
  7. M

    [SOLVED] Second block collision problem

    I have this script for the player to move and stop when touching a block (called obj_colision). right_key = keyboard_check(vk_right); left_key = keyboard_check(vk_left); up_key = keyboard_check(vk_up); down_key = keyboard_check(vk_down); xspd = (right_key - left_key) * move_spd; yspd =...
  8. M

    How to collision

    This might sound like a noobish question but I use this code for making a player 8-directional movement: hInput = keyboard_check (ord("D")) - keyboard_check (ord("A")); vInput = keyboard_check (ord("S")) - keyboard_check (ord("W")); if (hInput != 0 or vInput != 0) { dir =...
  9. crunchymonkey

    GML Making multiple collisions with different objects

    I've been working on a game where you have multiple objects (spores) follow the player at once, much like a small army from pikmin. The issue I'm having is, is that I want all of the objects (spores) following the player to collide with each other so they don't overlap on screen. The only way I...
  10. Crash

    SOLVED Object attachment based collision issue

    Heya, recently I've been trying to work on a camera system where it uses the viewport and moves it with the camera, howerver unlike basic attachment camera scripts I'm trying to have the camera stop moving whenever it hits a "camera barrier" I do this by attaching a 'cam block' onto the player...
  11. K

    Jumping does not work with tile collisions

    I switched to tile collisions in my platformer, but now I can't jump anymore. I need a code for a onground detector, because I don't know how that works with tile collision. I'm a bit of a beginner at gamemaker 2, so i need help. var xDirection = keyboard_check(ord("D")) -...
  12. gkri

    GML LiquidFun: How to detect collisions between soft body particles?

    What I am trying to accomplish is play a "splash" sound when the new-spawed particle group impacts with the other particles. I have only managed to implement a partial working solution and I am playing sounds based on the particles negative velocity, because I could not find a way to get the...
  13. C

    GML New instance not detecting collision

    Solved - Jump to reply with solution > — When I first create an instance and check for collisions, it shows there are no collisions despite clear, apparent colliding instances. If I move the new instance around (via wasd keyboard events) and back to its original position, the collision check...
  14. M

    GameMaker Collision not working on a specific variable

    If I try to make the player stop moving when touching by updated xSpeed and ySpeed respectively, nothing happens. I've used this code before and its always worked, but for some reason now its giving me issues. I know collision is being detected because if I use moveSpeed instead of xSpeed or...
  15. T

    SOLVED HELP with Platformer Collisions!

    I've been making my first Platformer Action Arcade, until I encountered the bug showing in the GIF. As depicted, the player keeps sinking when they are standing on the edge of the bridge platforms. Even if it wasn't caught on the video, in case it helps, when the object does that it switches...
  16. Tangerine

    GameMaker 3D Colissions with a plane which vertices are modified with a shader.

    Is it possible to check for collisions with a plane that has its vertices distorted with a vertex shader? For example with vertices that a shader modifies its z position like the waves of this video:
  17. A

    GML What is wrong with my collision code?

    I have an issue with my player's collision. Here's the code: var _platform = instance_place(x,y+max(1,vsp),obj_platform); var _platform2 = collision_line(xprevious,yprevious+sprite_height/2,x,bbox_bottom,obj_platform,0,true); if ((_platform) && bbox_bottom <= _platform.bbox_top) ||...
  18. B

    SOLVED Issues with collision:

    Writing to generally say that my collision is really wonky. It isn't actually stopping the player when they hit the wall, it just slows them down heavily. Any help would be appreciated. This is my step event for the player: //Player Input keyLeft = keyboard_check(ord("A")); keyRight =...
  19. peter798

    GameMaker How to keep track of objects an object has collided with?

    I want an object to only collide with multiple objEnemy exactly once each. I have attempted something like this: var enemies = []; enemy = instance_place(x+x_increase, y+y_increase, objEnemy); if(enemy != noone) { for(i=0; i < array_length(enemies); i++) { if(enemy.id==enemies[i])...
  20. X

    GameMaker Score going to infinity ingame

    So I am new to gamemaker and I was trying to make a point system to keep track of how many enemies have been defeated but when an enemy is defeated the score goes to infiniy. I made an object with no sprite and when Collison from the player comes in contact with a enemy their sprite is switched...
Top