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 / Please open my eyes to collision

Author
Message
fhtughryf
16
Years of Service
User Offline
Joined: 1st Jul 2008
Location:
Posted: 5th Jul 2008 10:16
I feel this is my biggest obstacle. Let me draw a scenario and give me your solution.

Lets say you have a room with four walls and in the center of the room you have a box.

Now how do you tell your player(cube) that you cannot walk through walls and at the same time you cannot walk through the box?

Do you somehow magically set collision rules using some sort of data file that defines collision boundaries?

Do you check for individual collisions of each item when the character runs into it? And if so how do you actually go about doing this in a 3D environment?

I have experimented with collisions and I can't seem to get it right and flawless.
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 5th Jul 2008 19:14
i cant even get a person walking on the floor let alone not walking through walls!

Creators of Outscape

http://forum.thegamecreators.com/?m=forum_view&t=132472&b=8
fhtughryf
16
Years of Service
User Offline
Joined: 1st Jul 2008
Location:
Posted: 5th Jul 2008 20:14
You know what I'm thinking since I'm to feeble minded at the moment to handle collisions properly until I buy a book on the subject and actually learn this I'm going to make a ghost game.

Since ghosts have the unique ability to walk through walls and floors that will spare me from going out of mind by trying to code collisions.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Jul 2008 23:53
Hallo fhtughryf ...don´t give up !!...here I show you the easiest way to do it. There are a lot of differents method of doing that, but at firt we can drive crazy...

Downloal the attached rar, and enjoit !!

cheers.

oh my god

Attachments

Login to view attachments
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 6th Jul 2008 12:32
You could use intersect object at different angles on all objects like in this example
The two spheres show to where the ray is casted

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 6th Jul 2008 18:06
Hallo Scorpyo, I was showing our friend the basic collision in order he could understand how to do something like....but we can show him other way to do it.

This Scorpyo´s code shows us in a brilliant way how to do collision by the intersect command method.



cheers.

oh my god

Login to post a reply

Server time is: 2024-09-27 16:23:08
Your offset time is: 2024-09-27 16:23:08