Texture Collision

BlitzMax Forums/MiniB3D Module/Texture Collision

CASO(Posted 2007) [#1]
I am trying to make a racing game and I need to know when the player is driving on grass. What is the best way to determine what texture the player is colliding with?


klepto2(Posted 2007) [#2]
Wait till my next release ;) and use Newton for this task.
The next release will have the fully vehicle capabilities of newton integrated. There you could split your racing level into different materials with every single one having there own properties and the wheels of the vehicle will react on them.
Without I would suggest a bitmap where you define your regions and the create a lookup table from this data. Then you only have to compare the current car pos (maybe wheel by wheel) with the table und you get the correct underground.


Sveinung(Posted 2007) [#3]
Isn't it possible to make the terrain one object and the road another object?

Sveinung


ninjarat(Posted 2007) [#4]
Yeah. I can't say right off hand how you would do it. But I just thought of maybe you could generate a road mesh from looking at height on the terrain.


CASO(Posted 2007) [#5]
I started this project with Simon's version (which doesn't have terrain), but I have recently downloaded klepto's extended version (which currently has slow loading terrain [I'm waiting for the next release]).

Thanks ninjarat for that idea. It would probably work if I created a raised road.