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 / Using a matrix made in Blender 3D

Author
Message
Yodaman Jer
User Banned
Posted: 8th Dec 2007 17:53
As the title says, I want to use my own matrix which I am in the process of creating, but I'm unsure on how to get the collision detection of it if my character rolls over hills.
Do I use the GET GROUND HEIGHT command?

Or is there a different, more efficient command that would do the job just fine?

Yodaman

Signatures....peh. I never come up with anything good to say in them. Ah well.
Insert Name Here
18
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 8th Dec 2007 17:57
Get Ground Height does not work with models.


Sudoku arts, the rabi and Nancy DrewG
Yodaman Jer
User Banned
Posted: 8th Dec 2007 18:09
DAANG..well, what if I just made a matrix with no hills, then created a "hill" as a separate model and applied collision detection to that?

And thanks for the info INH.. you just saved me hours of trying to use that and getting mad at my computer...thanks.

Yodaman

Signatures....peh. I never come up with anything good to say in them. Ah well.
Yodaman Jer
User Banned
Posted: 8th Dec 2007 19:19 Edited at: 8th Dec 2007 19:20
I feel really silly for asking this, but it is 100% related to this...

I went in DarkHELP and found the following, but don't understand it:

3D OBJECT COLLISION
When 2 3D objects in 3D space overlap it said they're colliding. There are 3 types of collision a 3D object can use, and each depend on the shape of the area of collision. By default, objects use a collision area that is perfectly contoured to every polygon on the model, and represents the slowest from of collision. A sphereical collision can be wrapped around the object to provide the fastest collision detection and a rectangular bounding box is the third type of collision shape.

This part (By default, objects use a collision area that is perfectly contoured to every polygon on the model, and represents the slowest from of collision.) made me wonder, doesthis mean I can set it to collide on every side depending on where the polygons are?
Like a hill for example...you can go up, down, and on regular ground, just slide. Does anyone know of any commands that will let me use this type of collision?

Thanks,
Yodaman Jer

Signatures....peh. I never come up with anything good to say in them. Ah well.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 18th Dec 2007 14:59 Edited at: 18th Dec 2007 15:03
What's wrong with a DB matrix?

The command you want is
SET OBJECT COLLISION TO POLYGONS [object number]
But like it says this is slow, I would suggest cutting your landscape up into smaller models and then SET OBJECT COLLISION TO SPHERES on the ones that aren't near the player.

A much better idea would be to forget about collisions all together and store the height of your landscape in an array. You could make the array a simplified version of your landscape.
Then check the height of the player against the position in the array (much like DB does with matrices).

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th Dec 2007 22:37
Quote: "You could make the array a simplified version of your landscape"
Bad idea.

He would have to calc all kinds of stuff to get ground height between "points with different elevation" - namely atanfull, and more math before that to calc where the player dude is - how far each direction in the "Square" for that to even work right.

Two choices:

This is DarkGDKC++ - but pretty easy to translate - if you have issues - let me know.


or

Use Sparky's and Raycast from a KNOWN height (10000 is what I used before) and shoot it down to the Ground - then you can do a distance check compare point of origin 10000 units above 0 (Origin) and the poitns it says it smacked your ground object.

Yodaman Jer
User Banned
Posted: 18th Dec 2007 22:54 Edited at: 18th Dec 2007 22:57
Quote: "What's wrong with a DB matrix? "


Well, I think it's hard to sit there staring a screen trying to figure out what point you want to raise, how high you want it, and then texturing sounds like a nightmare!! Plus, it slows the app down using a DB Matrix, I do believe TDK says "Use your own if you can" because it runs faster.
Thanks you so much for telling me the command!! I've got a pretty spiffy PC and it should run just fine with it. Does it slow the app down seriously if I just use it for .X models, such as a pillar and maybe some buildings? I would prefer to completely design my level visually, and just using that command, but if that slows it down...*gulp.*
Would I just use SET OBJECT COLLISION TO POLYGONS for a level made in CS4 or 3DWS?
Because if I could get one of those apps, I could have a lot of fun with them...

Wii came . . . Wii saw . . . Wii conquered!
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 18th Dec 2007 23:05
the problem with using that method with buildings would be things which overhang the floor and stuff like that... It would probably be easier to have the stuff you can walk on as one object and then all the other stuff seperately (I would think... I may well be wrong though)

tha_rami
19
Years of Service
User Offline
Joined: 25th Mar 2006
Location: Netherlands
Posted: 19th Dec 2007 03:18
Listen to Jason P Sage, he's gosu and he's right.


A mod has been erased by your signature because it was larger than 600x120
Yodaman Jer
User Banned
Posted: 19th Dec 2007 03:37 Edited at: 19th Dec 2007 03:49
Cool...thanks for your tips guys, you're really helping!
I think what I will do (to make everyone happy) is:
1) Create landscape using Matrix 3D commands
2) Design objects for landscape (buildings, buildings with interiors, pillars, coloumns, misc. level objects) and use SET OBJECT COLLISION TO POLYGONS [Object #] command.
3) Give everyone who has helped me the link to my site which will have the game in free open-source form, but that will be a while. I'll tell you what the game is called: MAZE-O-MANIA!!
Again, thanks for the tips!

Yodaman Jer

EDIT: I forgot to mention that the media in the game will have some imported 3D models, i.e., skyboxes, certain platforms, textures...that I will have to get onto the site in a different matter. Or I'll just zip all the files...

Wii came . . . Wii saw . . . Wii conquered!

Login to post a reply

Server time is: 2025-06-02 10:06:35
Your offset time is: 2025-06-02 10:06:35