• 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!

fixtures

  1. Vulpes_Coders

    GML Is it possible to detect which physic fixture collided?

    Hi, I am making a 2D platformer game with physics enabled. To solve some movement issues I've binded 2 different fixtures to the same player object. One is used as "legs" with higher friction and the second one as "body" with lower friction to slide on walls (image bellow). This works great, but...
  2. Geners

    GameMaker Changing my collision shape for physics isn't working

    Hey, so I am trying to change the collision shape on this object, but this doesn't seem to work. What am I doing wrong? The object has physics enabled and it's set to solid. phy_rotation = 0; phy_fixed_rotation = true; var _width_in_tiles = irandom_range(3,8); var _height_in_tiles =...
  3. bandman28

    How do I change my Physics Fixtures?

    MODERATOR EDIT: This topic was messed up due to a mistake with moderation tools, and as such has been locked. The replies here refer to the following new topic: https://forum.gamemaker.io/index.php?threads/how-do-i-change-my-physics-fixtures.106530/ Please continue all conversation in that...
  4. Pompadour Dude

    Fixture properties

    Hi there. Im learning how does physics work in GM. So... I have a few questions about fixtures. Fixtures have some properties that define how instances behave. And how can we decide which values to use in some case? In my, I have ship physics simulation - ships and water (view from the top)...
  5. TongueSurgery

    Creating Physics Fixtures in code and "flipping" them

    Hi all, I created some fixtures in code to use and I'm wondering if it's possible to to just "flip" or mirror them so that it's the same fixture, but mirrored, depending on which direction the sprite is. I've seen a couple threads about this already, but they didn't really go into detail on why...
  6. Mookal

    HTML5 [Solved] Binding Physics Fixtures Causes a Crash

    [HTML5, GMS2] I'm creating a customizable physics simulation intended to be playable in browsers. Everything was going smoothly until I implemented the ability to scale the physics objects (I'm using the built-in physics system). This involves creating fixtures with the proper sizes, and...
  7. Y

    GML (SOLVED) A prismatic joint keeping a object equipped on anothers' backside (from a side perspective)

    Hello community, I am attempting to program a method to make two physics fixtures properly interact with each other which is making a backpack (physics object) properly attach to the backside of the player character (physics object) even while turning left or right or rotating, this must work...
  8. A

    Creating fixtures or using an object for solid static blocks?

    There is probably a really simple answer to this but I recently looked through the physics tutorial on the blog and was wondering what the benefit of having this in the create event of a static floor object is... var fixture = physics_fixture_create(); physics_fixture_set_box_shape(fixture...
  9. A

    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...
  10. 0TastyPie0

    GameMaker Drawing a line that then becomes solid for other physics objects

    I'm working on a marble run type game, were the player can draw lines for the marble to run down. I use fixtures to setup and draw the line, however other physics objects (such as the marble) seem unaffected by the line. They simply pass through it, when the line is suppose to act as a wall...
  11. S

    Sprite offsets when a fixture is rotated

    I was wondering why the sprite of an instance sort of offsets when the instance is rotated. The red box is the actual shape of the fixture box drawn by phy_debug_render_shapes and the black sprite shouldn't be visible if it was working as intended. The left peg is at the starting angle and...
  12. Y

    GML Flip/Mirror collection of fixtures (Physics)

    In the picture below is a skull made out of 2 objects, the top of the skull and the bottom of the skull (jaw) Now I want the collection of fixtures associated with these objects to mirror themselves at the press of a button. (So that the skull faces left) Flipping a sprite is easy, but can one...
  13. Y

    GML using "physics_fixture_set_collision_group" to change group while the fixture was already called

    Hello community, In my game I am trying to change the collision group of a physics object with "physics_fixture_set_collision_group", now I realize this function probably only works during the creation of a fixture and not while it was already created. The reason why I need to do this is...
  14. B

    GameMaker Unbinding physics fixtures from objects

    Hi all. I'm trying to restore an object to normal behaviour after removing a physics fixture from it but I'm unable to do so. It's for a track editor that I'm working on - The desired behaviour is that a track wall object follows the mouse until it is placed (working correctly) and then after...
  15. R

    Wall Fixtures not creating as expected.

    I'm creating some scripts to create a fixture for a wall segment, (in this example a bottom), using the bottom left corner here and spanning right checking for end of the wall segment to then create the appropriate fixture. The fixtures aren't quite the right lengths and are not in the right...
  16. J

    Windows In which measure do I must define the fixture points position?

    I'm having a very anoying time trying to define points for a polygon shape fixture through code. After a while I noticed that I couldn't just cupy the coodinates from the shape editor because when you define them trough code, the reference point is the sprite offset, that's right, but I also...
  17. acidemic

     Bug with Physics Looped Chain Fixture

    There is a bug with looped chain fixtures in the physics engine. 1) This code which uses fixture loop creates a bug: ter_fixture = physics_fixture_create(); physics_fixture_set_chain_shape(ter_fixture, 1); // Looped fixture for (var i=0; i<ter_size; i+=2) {...
  18. D

     [Feature Request] Add multiple fixtures in GUI

    I commonly find myself needing to assign an object multiple, separate collision shapes. For objects with a kind of "inside", like a cup for instance, you simply can't create the shape in the GUI since it currently only allows for a single convex shape. Creating such shapes through code is...
  19. J

    GML Box2d fixture area

    QUESTION 1 Is there a way to get a fixture's area inside the object step event ? Under the hood, I know box2d is computing a mass for every instance based on it's area and density so I wonder why there is no simple way for me to get said area ??? Because of this I tried dividing the instance...
  20. D

    physics_fixture_set_collision_group results in "The physics fixture does not exist"

    debug says fix=46, inst=100059, my_fix=1 When I stepped into the "with", debug said other.my_fix=1. The "physics_fixture_set_collision_group" line gave the error saying there is no fixture. This example is mostly based off of the physics_fixture_bind example in the on-line documentation. Anyone...
Top