fixtures

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 0TastyPie0

    GMS 2 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...
  7. Strakee

    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...
  8. 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...
  9. 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...
  10. B

    GMS 2 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...
  11. Rizlad

    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...
  12. 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...
  13. 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) {...
  14. 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...
  15. 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...
  16. 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...
  17. D

    check which instance of a physics object, if any, is at a point

    Functions like instance_position and collision_point can are for non-physics objects and ignore fixtures (one workaround is to enable pixel-collision checking to get a processor-intensive approximation of fixture collision checking). physics_test_overlap works with physics fixtures but won't...
  18. C

    GML Fixture won't go away

    I'm trying to clear a fixture but no matter what I try it just won't dissappear. Here's the code: Create: A= physics_fixture_create(); //Creates the first shape (Of like 300) physics_fixture_set_box_shape(A, 16*image_xscale, 16*image_yscale); physics_fixture_set_density(A, 0)...
  19. S

    FIXED - Testing for collision at certain fixture points?

    Hello all, this is my first time posting in these forums so forgive me if I am in the wrong area. I recently purchased GameMaker Studio and tons of modules after hearing about how good it was. Being familiar with a few other IDEs and builders, I was curious as well. Suffice to say, I am...
Top