Author Topic: Collision Detection  (Read 3792 times)

cyberkilla

• float
• Posts: 413
Collision Detection
« on: February 28, 2007, 01:52:48 pm »
Hello, I am slightly confused with collision detection.

I can get it working, but the movement seems a little unrealistic.

I mean, my character is able to walk up a rock face that is at a very steep slope.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

• Posts: 11792
Re: Collision Detection
« Reply #1 on: February 28, 2007, 04:08:18 pm »
Which algorithm are you using? Ray-polygon, sphere or ellipsoid?

cyberkilla

• float
• Posts: 413
Re: Collision Detection
« Reply #2 on: February 28, 2007, 05:29:03 pm »
Ellipsoid:)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

• Posts: 11792
Re: Collision Detection
« Reply #3 on: February 28, 2007, 06:15:06 pm »
Well, the ellipsoid collision detection creates a so called sliding plane (the tangent plane to the ellipsoid on the point of intersection) and adjusts the movement to move along that plane. If you want to prevent some kind of movement, you've to do this after the collision detection i.e. calculate the angle between the actual movement vector and the resulting vector and only execute the movement if it's below XX...for example. I don't know if this applies in your case, but i hope you got the idea...
« Last Edit: February 28, 2007, 11:55:28 pm by EgonOlsen »

cyberkilla

• float
• Posts: 413
Re: Collision Detection
« Reply #4 on: February 28, 2007, 07:16:17 pm »
Ah, I understand now:).

I think I can manage that...later.
Prioritizing is good:).

You know, I do have some screenshots, but they are not great.
Heck, I'm sure I can give you better ones in a few days to replace them.
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

• Posts: 11792
Re: Collision Detection
« Reply #5 on: February 28, 2007, 07:18:38 pm »
Doesn't matter if they don't look that good. I'll use them in 240*180 anyway...almost anything looks cool in 240*180...

cyberkilla

• float
• Posts: 413
Re: Collision Detection
« Reply #6 on: February 28, 2007, 08:36:51 pm »

Its not a great screenshot, because some of the gui is not on, and I haven't set up lights
in the scene.
Still, I looks half decent for now.

Thank you for offering to do this;)
« Last Edit: February 28, 2007, 08:40:50 pm by cyberkilla »
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

• Posts: 11792
Re: Collision Detection
« Reply #7 on: February 28, 2007, 11:57:22 pm »
Is the automap fake or real for now?

cyberkilla

• float
• Posts: 413
Re: Collision Detection
« Reply #8 on: March 01, 2007, 12:21:10 am »
It is fake for now, but it I have some ideas.

First idea is to capture a render of the entire map at load time, and scale it proportionately. That way, the center of
the minimap is 0,0,0, and your position can be found by a mere division.

The second is to just draw it roughly and to the same trick.

The second is probably better, because I plan to use a lot of underground complexes;)

The method used in your examples, with the vislist is interesting too, but isnt quite what I plan.

I was going to do a simple "fog of war" on the map, but it would be screenshotted quite quickly, and made available by other players, so I seen no point:).
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG