Tutorial 3: Adding Fence Collision

This page is a work-in-progress.


This tutorial will guide you through expanding the map created in Tutorial 2: Adding Roads to have fence collision that makes it so you can no longer escape the bounds of the map.

Fence Collision is vertical, infinitely tall collision that is only collidable on one side. It's main purpose is facing inwards towards the playable area to keep the player within the bounds of the map.


You will need the following things to accomplish the steps in this tutorial:

  • The Simpsons: Hit & Run for PC
  • Lucas' Simpsons Hit & Run Mod Launcher
  • Lucas' Simpsons Hit & Run Model Builder
  • SketchUp Make 2017
    • Knowledge of how to use SketchUp in general will help as well as these tutorials may not go into very much detail about the specifics of how to use it.
  • A Text Editor, we recommend Notepad++.
  • The map created in Tutorial 2: Adding Roads.

Part 1: The SketchUp File

Fence Collision is pretty simple to add as it's just a series of lines. However, as pointed out in the introduction, it can only be collided with on one side so the direction you draw the lines and the tag you use matters.

  • [FenceCW]TODO: Explain this
  • [FenceCCW]TODO: Explain this

To start, you'll want to focus the "Terra" group that your roads are in and draw 4 lines going around the bounds of the map. Make sure to go in the same direction with all of them!

TODO: Image or gif or something showing that here

Since this is a flat map, doing that will create a face inside the 4 lines. You will want to delete this face.

After you've removed the face, you should select all 4 lines and group them. Assuming you drew the lines in the same direction as above (clockwise), you will want to tag this group [FenceCCW] to make them face inwards.

TODO: Image of outliner here

Part 2: Build and Try It Out

There's no new rules to add for the fences so you're actually already done!

Now it's time to run Build.bat to see if it works ingame.

If you've done everything right, the map should successfully build and the edges should now effectively be invisible solid walls.

TODO: Image here

If you go through the collision and notice it's only collidable in the opposite direction from what you'd expect, try using the opposite Fence tag and see if that resolves it.

You're done!

That's it for this tutorial. If you'd like, you can download a completed ZIP of the mod created in this tutorial from the sidebar of this page (Tutorial 003 Complete.zip).

Up Next: ???

Back to top