Join Steven Moser for an in-depth discussion in this video Swap fixtures, part of Building a Physics-Based Platformer in GameMaker Studio Using GML.
- [Instructor] It'll be easy for us…to swap out our physics fixtures.…All we need to do is update…our ducking and unducking script.…I'm gonna double clip the ducking script.…And when we check for the down arrow pressed event,…we first want to remove…the currently bound running fixture.…So, we'll use the function physics underscore…remove fixture.…We'll pass at the ID of the incidence…that we want to remove the fixture from.…
Which, in this case, is our player object incidence.…We have a built-in variable since we're calling it…from the actual player object.…We can just use ID.…This is the incidence ID of the player object.…Keep in mind that you can…have multiple incidences of a single object.…We only have one incidence of our player object…but that's not always the case.…ID is the way to reference that unique incidence.…For the next argument,…we pass our reference to our bound fixture.…Which we called in the create event, boundR.…So, that will remove the running fixture.…
Now, let's bind the ducking fixture.…We'll use the function physics underscore…
- Setting up basic game components
- Creating the player object
- Using Finite State Machines
- Making the player duck
- Creating physics fixtures in code
- Creating physics obstacles
- Box2D liquid physics
- Creating particles that behave like water
- Creating a floating blocks obstacle
- Creating a swinging chain obstacle and a rope bridge
- Adding the finishing touches
Skill Level Beginner
1. Set Up Basic Game Components
2. The Player Object
3. Create Physics Obstacles
4. Liquid Physics
5. Decorate the Level
6. Finishing Touches
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.