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.

Newcomers DBPro Corner / Object collision with Matrix

Author
Message
Red Rain
15
Years of Service
User Offline
Joined: 28th Aug 2009
Location:
Posted: 16th Sep 2009 22:33
I've been tinkering around with the "matrix example" that came with DBPro software. I'm in a process of making a 3d Rpg game thats finds yourself inside an active volcano/mountain with lava flowing threw its caverns. With the help of the matrix example, I was able to make the lava have the look of a flow rythm like waves of the ocean.

My question is, My main character can go threw this flow of lava without damaging its health. I need to add some kind of collision detection whenever my character touches the lava to decrease its health or an instant kill.

How do I do that?
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 22nd Sep 2009 02:41
I'd say place a hidden plane on the lava so when your character collides with that it's easier to tell, I don't know any method for colliding with certain parts of the matrix. If the lava is actually just a whole separate matrix then have damage apply when he touches that matrix.

I hope I made some sense!

Red Rain
15
Years of Service
User Offline
Joined: 28th Aug 2009
Location:
Posted: 22nd Sep 2009 20:45
I've thought about making an invisable object like a cyclinder or your idea "a plain" to where the lava is place and when my character touches it, it'll decrease health points. Works fine now. Thanx for your input
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 1st Oct 2009 01:53
Try using GET GROUND HEIGHT on the matrix, then plugging in your player's X and Z coordinates. Then just check if your player's Y coordinate is above or below the matrix.

Maybe something like this:


You could even offset the Y coordinate by half of the player model's height downward (if its origin is in the middle) to detect if the player's feet are in the lava.

<-- Spell based team dueling game!

Login to post a reply

Server time is: 2024-09-28 10:34:02
Your offset time is: 2024-09-28 10:34:02