Creating walls for the edges of the road?

andreww
Posts: 2
Joined: Thu Apr 24, 2008 6:30 pm

Creating walls for the edges of the road?

Post by andreww »

I am making roads, where the edges are generated from joins(having a position) and paths(has two joins it is connected to, and a width).

The attached picture shows the roads with the purple lines being the edges (and the white lines being the paths connected to their joins).

I want to make the the edges into walls so that vehicles cannot leave the road at all.

I don't know bullet very well, so could someone recommend what I should use for making the edges impassable?

Thank you.
dee.PNG
You do not have the required permissions to view the files attached to this post.
Oogst
Posts: 25
Joined: Thu Apr 10, 2008 11:19 am
Location: Utrecht, Netherlands

Re: Creating walls for the edges of the road?

Post by Oogst »

One way would be to create vertical collision triangles on each of the edges. However, triangles are relatively instable compared to collision boxes, because they are infinitely thin. Therefore instead you could make the walls with collision boxes, but you would have to be carefull at corners of more than 90 degrees, because one wall would stick out over the road through the other wall.
IGDbonbon
Posts: 5
Joined: Sun Aug 03, 2008 7:31 am

Re: Creating walls for the edges of the road?

Post by IGDbonbon »

If you dont need to create the road on run-time, maybe you can build a bsp,
using free tools like Gtkradiant.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Creating walls for the edges of the road?

Post by sparkprime »

You can get the stability of boxes without the 90 degree corners by using a collision hull. Collision hulls are convex shapes defined by a cloud of vertexes. You would "fill in" the regions of space that lie outside the roads with as many convex shapes as you need. Alternatively, use convex shapes to build "walls" as thick as you need to stop game object tunneling through them.
Oogst
Posts: 25
Joined: Thu Apr 10, 2008 11:19 am
Location: Utrecht, Netherlands

Re: Creating walls for the edges of the road?

Post by Oogst »

Ah, are convex hulls that stable in Bullet? That is really nice!