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.
Creating walls for the edges of the road?
-
- Posts: 2
- Joined: Thu Apr 24, 2008 6:30 pm
Creating walls for the edges of the road?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 25
- Joined: Thu Apr 10, 2008 11:19 am
- Location: Utrecht, Netherlands
Re: Creating walls for the edges of the road?
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.
-
- Posts: 5
- Joined: Sun Aug 03, 2008 7:31 am
Re: Creating walls for the edges of the road?
If you dont need to create the road on run-time, maybe you can build a bsp,
using free tools like Gtkradiant.
using free tools like Gtkradiant.
-
- Posts: 508
- Joined: Fri May 30, 2008 2:51 am
- Location: Ossining, New York
Re: Creating walls for the edges of the road?
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.
-
- Posts: 25
- Joined: Thu Apr 10, 2008 11:19 am
- Location: Utrecht, Netherlands
Re: Creating walls for the edges of the road?
Ah, are convex hulls that stable in Bullet? That is really nice!