Nick Urko's Portfolio

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.
 

Making a Seesaw

Picture
  • Find a mesh that you want to make into a seesaw.
  • Make sure it has an appropriate collision model.
Picture
  • Place it into the world as a KActor.
Picture
  • Go to the content browser and add an RB_HingeActor to your level.
Picture
  • Place it where you want the pivot point for the seesaw to be.
  • Make sure that the arrow is perpendicular to the seesaw.
Picture
  • Go into the RB_HingeActor's properties, and assign the seesaw mesh to "Constraint Actor 1."
Picture
  • 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.
Picture
  • 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.
Picture
  • 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.
Picture
  • Rebuild the level and you have a working seesaw!

Making a Waterwheel

Picture
  • Find a mesh for the waterwheel.
  • Make sure it has an appropriate collision model.
Picture
  • Find a mesh for the waterwheel platforms.
  • Make sure it has an appropriate collision model.
Picture
  • Place the meshes in your level as KActors.
Picture
Picture
  • Place two RB_HingeActors into the level.
Picture
  • Go into the central RB_HingeActor's properties, and assign the waterwheel mesh to "Constraint Actor 1".
Picture
  • 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".
Picture
  • 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.
Picture
  • 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".
Picture
Picture
  • Add an RB_Thruster to the level.
  • Rotate it so the arrow is pointing in the direction you want it to rotate.
Picture
  • 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.
Picture
  • Copy the different components and position them to make up the rest of the waterwheel.
Picture
  • Rebuild all and play.

Making a Collapsing Pillar Section

Picture
  • Find a mesh that you want to use for your pillars.
  • Make sure it has an appropriate collision model.
Picture
  • Place it into the world as a KActor.
Picture
  • Go to the content browser and add an RB_PrismaticActor to your level.
Picture
  • 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.
Picture
  • 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.
Picture
Picture
  • Everything is set up, so copy/paste the mesh and the constraint until you have a set of pillars.
Picture
  • 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.
Picture
  • Create a trigger volume to activate the impulse actor.
  • Set up the Kismet.
Picture
  • Rebuild the level and you have a collapsing pillar section!