I have the following kind of race track:

enter image description here

As you can see some walls are talls but some aren't...


How can one create invisible walls so that cars stays in track?

More exactly, how to model walls for complex shapes in a relatively easy way?

  • \$\begingroup\$ why you can not place empty object with collider..? \$\endgroup\$
    – ShoulO
    Commented Jun 4, 2021 at 9:58
  • \$\begingroup\$ What is the effect of your game crashing into them? You can't just go there, you do some collision/ spinning, you can fall offtrack and need to reset your car, you loose speed, etc? \$\endgroup\$
    – Zibelas
    Commented Jun 4, 2021 at 9:58
  • \$\begingroup\$ @ShoulO Care to elaborate ? \$\endgroup\$
    – aybe
    Commented Jun 4, 2021 at 9:59
  • \$\begingroup\$ @Zibelas The car can't fall off into scenery, it must stay in the track, and yes, loose some speed. \$\endgroup\$
    – aybe
    Commented Jun 4, 2021 at 10:01
  • \$\begingroup\$ @aybe You are using Unity, right? so why not to create empty objects (objects which are invisible with only transform component), add box colider , and you have yourself invisible walls... \$\endgroup\$
    – ShoulO
    Commented Jun 4, 2021 at 10:04

1 Answer 1


I ended up creating my own editor tool/window combo:

enter image description here

The general idea is the following:

Click a quad vertex, add a wall point, upper point is just Vector3.up.

And allow to remove any point as well.

Along necessary data/logic, etc.

Though manually paint, any vertex can form a collider thus I'll get vertex perfect colliders.


I now leverage the following:

  • store data directly in game objects
  • a global editor tool + a custom window in scene view
  • scriptable singleton for tool data

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .