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 / Best method of level collision...

Author
Message
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 4th Aug 2008 20:12 Edited at: 4th Aug 2008 20:12
Is it best to use sliding object collision for a level or a matrix?
I want to be able to rotate the player object to the angle of the slope or hill or whatever.Its a sonic style game(so he'll be going downhill,LOL.), and i dont want to do both objects and matrixs(dont ask why).
EDIT]
Actually,I pulled out that old hovercraft Pod game(The "Please Test." Thread...) and rememberd how to rotate an object to a matrix correctly. So What i'd like to know now is if its possible to rotate an object to another object's vertices? If not i'll have to stick with matrixs.....

Help?

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 4th Aug 2008 20:38
I have been thinking about this for a while, haven't tried it though. You could convert the object to a mesh and then into a memblock and read the vertex information into arrays. Then you could find the closest few verteces and rotate based off of those. Does that make sense?

Commands to use:
load object
make mesh from object
make memblock from mesh (might have the command name a little off)

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Dark Dragon
17
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 4th Aug 2008 21:58
yeah that makes sense.
i'll have to come up with a way to do that.............

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 4th Aug 2008 23:57
if you look at the dark basic functions library thread I made a while back, I wrote a function that will store all of the positions of verteces into arrays. I believe it is the first one in the object library file, so you can take a look at how that works.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Bluestar4
19
Years of Service
User Offline
Joined: 19th Dec 2005
Location: USA
Posted: 5th Aug 2008 14:38
I believe there is an online tutorial that covers this but although this is included in the tut it doesnt say that its included so you have to kinda look for it

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Aug 2008 23:23 Edited at: 5th Aug 2008 23:25
Here's a snippet adapted from the snowboarding example by Phaelax that TDK found on the Code Snippets board.



But I don`t know how you do that with objects. If you find out, could you post some code?

Suicide is away of telling God, You can’t fire me I quit !!!!!

Login to post a reply

Server time is: 2025-06-07 06:39:49
Your offset time is: 2025-06-07 06:39:49