Debug drawing
ep_gm_functions_init
ep_gm_functions_init()
Initializes GM functions, for GM6, GM7 and GM8. It doesn't work in GM8.1, use the next function instead. You should call this function before using debug drawing. Don't rely on this function, use it only for debugging purposes.
Returns whether successful.
ep_gm_functions_init_address
ep_gm_functions_init_address(address)
Same as the previous function, but for GM8.1. It should be called like this:
ep_gm_functions_init_address(get_function_address("get_function_address"));
get_function_address was added in GM 8.1.106. If you get an error message saying the function can't be found, you should update Game Maker.
Returns whether successful.
ep_debugdraw_set_transformation
ep_debugdraw_set_transformation(translation_x, translation_y, rotation, scale)
Sets a transformation that will be used for debug drawing. The transformations are performed in this order: scale, rotate, translate.
-
translation_x: The x component of the translation vector.
-
translation_y: The y component of the translation vector.
-
rotation: The rotation (in radians).
-
scale: The scale factor.
ep_debugdraw_bodies
ep_debugdraw_bodies(world_id, color_static, color_dynamic)
Draws the outline of all bodies.
-
world_id: The id of the world.
-
color_static: The color of static bodies.
-
color_dynamic: The color of dynamic bodies.
ep_debugdraw_links
ep_debugdraw_links(world_id, color_shapelink, color_contactlink, color_jointlink)
Draws links between connected bodies.
-
world_id: The id of the world.
-
color_shapelink: The color of shape links.
-
color_contactlink: The color of contact links.
-
color_jointlink: The color of joint links.
ep_debugdraw_views
ep_debugdraw_views(world_id, color_view)
Draws the outline of all views.
-
world_id: The id of the world.
-
color_view: The color of views.
ep_debugdraw_velocity
ep_debugdraw_velocity(world_id, color_velocity, scale, rotscale)
Draws the velocity vector of all bodies.
-
world_id: The id of the world.
-
color_velocity: The color of velocity vectors.
-
scale: The scale of velocity vectors.
-
rotscale: The scale of rotational velocity circles (use 0 to disable this).
ep_debugdraw_forces
ep_debugdraw_forces(world_id, color_force, scale, rotscale)
Draws important forces. This includes contacts, joints, joint limits and forces. This does not include springs and gravity.
-
world_id: The id of the world.
-
color_force: The color of forces.
-
scale: The scale of force vectors.
-
rotscale: The scale of torque circles (use 0 to disable this).
ep_debugdraw_constraints
ep_debugdraw_constraints(world_id, color_contactpoint, color_joint)
Draws all contacts and joints.
-
world_id: The id of the world.
-
color_contactpoint: The color of contact points.
-
color_hinge: The color of joints.
Comments
Birkb |
Comment #1: Mon, 25 Jul 2011, 12:13 (GMT+1, DST) Hi Maarten! |
Maarten BaertAdministrator |
Comment #2: Tue, 2 Aug 2011, 2:44 (GMT+1, DST) Quote: Birkb
Hi Maarten! It's a known issue, YYG changed something and I still have to write and upload the fix. EDIT: Done. Last modified: Tue, 2 Aug 2011, 19:43 (GMT+1, DST) |
Birkb |
Comment #3: Wed, 3 Aug 2011, 19:15 (GMT+1, DST) Quote: Maarten Baert
It's a known issue, YYG changed something and I still have to write and upload the fix. EDIT: Done. Just downloaded your v2.2.11. Best regards Birk |
Maarten BaertAdministrator |
Comment #4: Tue, 16 Aug 2011, 12:44 (GMT+1, DST) Quote: Birkb
Just downloaded your v2.2.11. Best regards Birk Did you use ep_gm_functions_init_address instead of ep_gm_functions_init? |
Earacher |
Comment #5: Wed, 22 Aug 2012, 6:55 (GMT+1, DST) Hi Maarten! |
Maarten BaertAdministrator |
Comment #6: Wed, 22 Aug 2012, 20:15 (GMT+1, DST) Quote: Earacher
Hi Maarten! What's a 'visual box'? |
Earacher |
Comment #7: Thu, 23 Aug 2012, 10:52 (GMT+1, DST) Quote: Maarten Baert
Quote: Earacher
Hi Maarten! What's a 'virtual box'? sorry! A "virtual box" ,collision_test_box/circle/polygon! Last modified: Thu, 23 Aug 2012, 10:56 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #8: Sun, 2 Sep 2012, 12:53 (GMT+1, DST) Quote: Earacher
sorry! A "virtual box" ,collision_test_box/circle/polygon! No, you can't draw those because they don't actually exist. They are forgotten immediately after the collision function ends. |
Xenolit |
Comment #9: Sat, 3 Aug 2013, 8:01 (GMT+1, DST) Hi. I use Game Maker Studio v1.1.827 Professional Edition. When I enable Btw thanx for the awesome physics engine, My computer graphics professor couldn't believe his eyes when he saw the fluid simulation ;p. Last modified: Sat, 3 Aug 2013, 8:02 (GMT+1, DST) |
Maarten BaertAdministrator |
Comment #10: Sat, 3 Aug 2013, 15:37 (GMT+1, DST) Quote: Xenolit
Hi. I use Game Maker Studio v1.1.827 Professional Edition. When I enable Btw thanx for the awesome physics engine, My computer graphics professor couldn't believe his eyes when he saw the fluid simulation ;p. I don't think debug drawing has ever worked in Studio. The runner has changed too much, and without get_function_address it's completely impossible, I would have to fix it again and again whenever a new version is released. Sorry, there's not much I can do. YYG just doesn't really care about extensions anymore. Last modified: Sat, 3 Aug 2013, 15:37 (GMT+1, DST) |
Xenolit |
Comment #11: Sat, 3 Aug 2013, 19:34 (GMT+1, DST) Quote: Maarten Baert
Quote: Xenolit
Hi. I use Game Maker Studio v1.1.827 Professional Edition. When I enable Btw thanx for the awesome physics engine, My computer graphics professor couldn't believe his eyes when he saw the fluid simulation ;p. I don't think debug drawing has ever worked in Studio. The runner has changed too much, and without get_function_address it's completely impossible, I would have to fix it again and again whenever a new version is released. Sorry, there's not much I can do. YYG just doesn't really care about extensions anymore. Well It's their loss. Because Studio's physics engine is nothing compared to Extreme Physics. I'm switching back to GM8. Last modified: Sat, 3 Aug 2013, 19:40 (GMT+1, DST) |