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.

Code Snippets / [DBP] matrix collision

Author
Message
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 30th Mar 2008 00:32
I know that We`v already talked hundreds of times about the matrix . Just being obstinate with collision and reading other friends problems, I,v made a piece of code that can nearly do collision with the matrix walls.

Instead of going straight ahead, we are forced to walk around the hills.

I hope that this piece of code can help somehow.

cheers.




oh my god
BerZerK
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 31st Mar 2008 12:10
Very nice, works like a charm. But, if were to use one matrix as a "floor" and one matrix as a "ceiling", how do I change the code so that the player cant go through the ceiling?
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 31st Mar 2008 22:24
Hallo BerZerk...as the same way you find out the matrix(floor) height, you can make a second matrix for the ceiling position it 300 units up and code something like:


so you can move all the way around and make your player stop up when reached the ceiling.


cheers.

oh my god
BerZerK
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 1st Apr 2008 11:31
I see. I'm having a hard time trying to add it though, I'll keep trying and get back to you.

Login to post a reply

Server time is: 2024-11-25 02:53:43
Your offset time is: 2024-11-25 02:53:43