Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Caves and Objects

Author
Message
Varegue
21
Years of Service
User Offline
Joined: 22nd Dec 2003
Location:
Posted: 22nd Dec 2003 19:37

I am getting more familiar with (standard DarkBasic).
I can create my sceneries, shaping matrix and implementing (.x and .3ds) objects such as trees, buildings,...
I made a routine to explore the sceneries.

The walking is managed by following matrix evolutions thanks to GET GROUND HEIGHT and collisions with OBJECT COLLISION, having previously set the objects with commands such as SET OBJECT COLLISIONS TO POLYGONS.

I am facing the 2 following bridges :

1. Is is possible to create caves, underpasses and tunnels, open that can be explorered ?

2. I have created a bridge, and a road on the matrix that crosses the bridge.
According to my above methods, I can take a walk on the landscape, pass under the brige, collide the bridge pillars, but if I follow the road, I can not cross the bridge.
Is there a way in standard DarkBasic to solve this point, without loosing collision properties ?
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 22nd Dec 2003 21:04
1: yes, use a mesh.
2:i dono.

BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Dec 2003 22:03
You could record objects that are "passable", and when you collide with one, trigger functionality that deals with it.

e.g objects 1-10 are trees, deal with them normally.

object 11 is a bridge, if collision occurs, raise player/car/camera until collision stops.

I've never done it, it's just a suggestion. If anyone has a good idea, I'd be interested too.

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 22nd Dec 2003 23:05
I do things the same way batvink does. If the bridge is flat, simply say

If Object Collision(bridge,player)>0
ObjY#=Height of top of Bridge
Position Object player,x,objy#,z
Endif

RPGamer


Dont forget to Join the Forums!
Varegue
21
Years of Service
User Offline
Joined: 22nd Dec 2003
Location:
Posted: 27th Dec 2003 18:34

I think un easy way to solve it would be to put a small transparent matrix on the bridge.
the (bride) object collision management would not change and it would therefore be possible to walk on the bridge.
This method would also be operational even if there was a slope; in that case the matrix whould follow the same angle as the slope, but would be limited in case of stairs.

Is there a way to (partly) wrap a 3D object with a matrix, or rather to create a matrix wrappind a .x or .3Ds object ?
If that was poosible, it would offer a simple and smart solution.
ReD_eYe
22
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 28th Dec 2003 20:51

Login to post a reply

Server time is: 2025-05-22 06:18:34
Your offset time is: 2025-05-22 06:18:34