UDK Physics Platforms
_By Nick Urko, C15 Level Designer
UDK Version June 2011
Created on 12/5/2011
This article will show you how to create example physics objects for use in a side-scrolling platformer. You can see these objects and more in action in my project Arbor.
*Disclaimer*
I have recently learned that Arbor used a custom Pawn class that allowed the player to react with KActors properly. You will need to modify the default Pawn class in order to enable interactions between the player and KActors.
UDK Version June 2011
Created on 12/5/2011
This article will show you how to create example physics objects for use in a side-scrolling platformer. You can see these objects and more in action in my project Arbor.
*Disclaimer*
I have recently learned that Arbor used a custom Pawn class that allowed the player to react with KActors properly. You will need to modify the default Pawn class in order to enable interactions between the player and KActors.
Making a Seesaw
_
- Find a mesh that you want to make into a seesaw.
- Make sure it has an appropriate collision model.
_
- Place it into the world as a KActor.
- _Go to the content browser and add an RB_HingeActor to your level.
_
- Place it where you want the pivot point for the seesaw to be.
- Make sure that the arrow is perpendicular to the seesaw.
_
- Go into the RB_HingeActor's properties, and assign the seesaw mesh to "Constraint Actor 1."
_
- Check "Wake on Level Start" to make the seesaw active when the level launches.
- Check "Pawn Can Base On" to allow your pawn to walk on the object.
_
- If you find that your character is falling through the seesaw, turn off "No Encroach Check".
- This mostly happens if the KActor is moving really fast.
_
- You may want to create a custom Physics Material so you can control how it moves.
- Increase the density to make the object feel heavier, or decrease the density to make it feel lighter.
- Rebuild the level and you have a working seesaw!
Making a Waterwheel
_
- Find a mesh for the waterwheel.
- Make sure it has an appropriate collision model.
_
- Find a mesh for the waterwheel platforms.
- Make sure it has an appropriate collision model.
_
- Place the meshes in your level as KActors.
_
- Place two RB_HingeActors into the level.
_
- Go into the central RB_HingeActor's properties, and assign the waterwheel mesh to "Constraint Actor 1".
_
- Go into the platform's RB_HingeActor's properties, and assign the waterwheel mesh to "Constraint Actor 1", and the platform mesh to "Constraint Actor 2".
_
- Go into the properties for the waterwheel.
- Check off "Wake on level start".
- Change the collision to "No Collision". The player won't be colliding with this item, and disabling the collision prevents weird behavior between the waterwheel and platform collision.
- You may want to create a custom Physics Material so you can control how it moves.
- Increase the density to make the object feel heavier, or decrease the density to make it feel lighter.
_
- Go into the properties for the waterwheel platform.
- Check off "Wake on level start".
- Check off "Enable Stay Upright Spring." This will make the platform stay oriented as the waterwheel rotates.
- Change the Torque properties to appropriate numbers.
- Check off "Pawn can base on." This will let the player stand on it.
- You may want to create a custom Physics Material so you can control how it moves.
- If you find that your character is falling through the platforms, turn off "No Encroach Check".
_
- Add an RB_Thruster to the level.
- Rotate it so the arrow is pointing in the direction you want it to rotate.
_
- Go into the RB_Thruster properties.
- Check off "Thrust Enabled" and fill in an appropriate value for "Thrust Strength".
- Attach the thruster to the waterwheel mesh.
_
- Copy the different components and position them to make up the rest of the waterwheel.
- _ Rebuild all and play.
Making a Collapsing Pillar Section
_
- Find a mesh that you want to use for your pillars.
- Make sure it has an appropriate collision model.
_
- Place it into the world as a KActor.
_
- Go to the content browser and add an RB_PrismaticActor to your level.
_
- Place it near your mesh.
- Go into its properties and constrain it properly.
- In this example, the mesh is constrained to the yz plane, and will not move along the x-axis.
- Also, the mesh will rotate along the x-axis.
_
- Go into the mesh's properties.
- Check off "Pawn Can Base On".
- You may want to assign a physical material so you can control it better.
_
- Everything is set up, so copy/paste the mesh and the constraint until you have a set of pillars.
_
- Drag an RB_RadialImpulseActor into your level.
- This is going to push the end pillar into the next pillar, so position it accordingly.
- Adjust the impulse strength and radius.
_
- Create a trigger volume to activate the impulse actor.
- Set up the Kismet.
_
- Rebuild the level and you have a collapsing pillar section!