Legacy GM Concave fixtures using paths

Gizmo199

Member
GM Version: Studio 1.4
Target Platform: ALL
Download: Concave fixture example
Links: N/A

In the above example, you can see how to use path points to bind multiple convex fixtures to an object to create a 'line' that follows a concave structure.

Basically how it works is that it reads all of the path points in the path and uses a 'for' loop to read the current point position and the previous point position and creates two points. It then reads which direction the points are progressing as either LEFT or RIGHT. It will then create the 3rd point either below the current point ( LEFT ) or above the current point ( RIGHT ) to ensure that the physics points are created in 'clockwise' order.
 

chance

predictably random
Forum Staff
Moderator
This works fine, and your example is nicely documented.

But it seems overkill for the static terrain example you provided here. Using the path to lay down a series of edge shapes would be simpler conceptually, as least to me. But we all have our own approach to these things.
 

Gizmo199

Member
Thank you for the reply! So I am planning on using this tutorial page to update as I create new uses for this system, the "concave using paths" approach. Such ideas as creating concave physics 'players' and possibly softbody physics using the paths as a way to alter the object, although not sure how well it will work in practice performance wise. I agree it can seem redundant but it offers a way to streamline a concave fixture to create as complex or simple fixture using one system. :) thank you for the input!
 

slojanko

Member
What's the difference between this and using a chain shape fixture? You're only making the outline of the terrain with polygons which seems wasteful for performance because the same affect is achieved with a chain.
 
Top