D
Dan B
Guest
Okay, so this is my first post in the GM:S forums. I've learned SO much from previous questions from users. I've just started learning about 3 months ago and w/ enough persistence I've always found an answer.
Unfortunately, this one has stumped me and so has 50 'googles'; so without further or due:
I have 'physics' off, and am using this code in my 'create':
This does create my standard collider, after that, in my "scr_move_state", I have a skill trigger (via double tapping) that changes to the "scr_dash_state".
Just before I change states, I use "physics_remove_fixture(obj_player, col_move)"
Then, I trigger the 'scr_dash_state', within this state, I simply multiply my speed, and use this block:
(Picture of examples, below)
While in my 'scr_move_state' my player is the shape of example '1', appropriately. When I'm in 'scr_dash_state' my player is SUPPOSED to be in the shape of example '2'. When I'm in the 'scr_dash_state' the 'scr_move_state' fixture still exists creating the fixture shape with the two combined; so I'm (physically) shaped like example '3' (note: my sprites work flawlessly, this is just a fixture issue)
I haven't gotten as far as removing the 'scr_dash_state' fixture because I can't even remove the 'scr_move_state' fixture during the 'dash'. This is surely incomplete~
Can someone please point me in the right direction? I guess I'm having 'conceptual' issues w/ using multiple fixtures. Ugh...
Unfortunately, this one has stumped me and so has 50 'googles'; so without further or due:
I have 'physics' off, and am using this code in my 'create':
Code:
col_move = physics_fixture_create();
physics_fixture_set_box_shape(col_move, sprite_get_width(sprite_index) / 2, (sprite_get_height(sprite_index) / 2));
physics_fixture_set_density(col_move, 0.5);
physics_fixture_set_restitution(col_move, 0.1);
physics_fixture_set_linear_damping(col_move, 0.1);
physics_fixture_set_angular_damping(col_move, 0.1);
physics_fixture_set_friction(col_move, 0.2);
physics_fixture_set_awake(col_move, true);
physics_fixture_bind(col_move, obj_player);
physics_fixture_delete(col_move);
Just before I change states, I use "physics_remove_fixture(obj_player, col_move)"
Then, I trigger the 'scr_dash_state', within this state, I simply multiply my speed, and use this block:
Code:
col_dash = physics_fixture_create();
physics_fixture_set_box_shape(col_dash, sprite_get_width(sprite_index) / 2, (sprite_get_height(sprite_index) / 2));
physics_fixture_set_density(col_dash, 0.5);
physics_fixture_set_restitution(col_dash, 0.1);
physics_fixture_set_linear_damping(col_dash, 0.1);
physics_fixture_set_angular_damping(col_dash, 0.1);
physics_fixture_set_friction(col_dash, 0.2);
physics_fixture_set_awake(col_dash, true);
physics_fixture_bind(col_dash, obj_player);
physics_fixture_delete(col_dash);
While in my 'scr_move_state' my player is the shape of example '1', appropriately. When I'm in 'scr_dash_state' my player is SUPPOSED to be in the shape of example '2'. When I'm in the 'scr_dash_state' the 'scr_move_state' fixture still exists creating the fixture shape with the two combined; so I'm (physically) shaped like example '3' (note: my sprites work flawlessly, this is just a fixture issue)
I haven't gotten as far as removing the 'scr_dash_state' fixture because I can't even remove the 'scr_move_state' fixture during the 'dash'. This is surely incomplete~
Can someone please point me in the right direction? I guess I'm having 'conceptual' issues w/ using multiple fixtures. Ugh...
Attachments
-
15.1 KB Views: 6