Skip to main content
gamedev.net
🔒 Locked

Help me PLEASE!!

Started by FireLord 4 replies 400+ views
Original Post
FireLord
FireLord
Hi all, This is my first message asking for help! So please help me How can I define the limits of my rooms? I have a 3D world but I don''t know how can I implement a algoritm to stop in fornt of a wall. There is a easy way too implement it? There is a sample: |------ | |--- | | |---- ---| | | | X |------ | |---------------- X is my position! I can''t sleep because i''m having nightwares to pass trought walls ) Thanks all Peacemaker
Strylinys
Strylinys
If you were doing a square based game like one of the original RPGs, then you could always have a txt file dedicated to the bounds... ie, wherever there was a wall on your map, you would have a 0 in you txt file... if there was a space you could walk, then a 1, just feed that into an array when you load a new map, and check the array every time you move...

Of course, if you''re talking about free movement not limited to square on a grid... you''ll be looking for some hit testing that i''d imagine works in almost the same way, just not as hard coded...

Have fun searching.

S.
FireLord
FireLord
HUMMM
I''m working with a free moviments!! I read a lesson 10 of tutorial of NeHe, but i''m still walking trought wall (
I''m feeling like a ghost.
But thanks
duhroach
duhroach
If your doing freemomvemnts, there''s a couple way syou can solve your hit collision problem
I suggest bounding boxes. create a "box" around your moving object, and test it against the closest polies in the scene.


Also, Check out www.gamasutra.com they have lots of good hit collision tutorials.

~Main
==
Colt "MainRoach" McAnlis
www.sinewave.net
manutd
manutd
there was a post around here not too long ago saying what is so hard about collision detection that explained it real well real quick...

The person was stressing it was so easy and showed how to do it in a few lines... much better thatn a 100 page tutuorial...

Is Pork a Noun or a Verb?

Jamie

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.