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.

Dark GDK / a little collision problem

Author
Message
psyum
16
Years of Service
User Offline
Joined: 31st Mar 2008
Location:
Posted: 5th Apr 2008 02:39
hi, again, i have a little problem with collisions i just have 2 models, 1 i can control with the arrow keys the other 1 is just static, so i can check for collision, the code is as follows

its a little messy but this is just a test...
please could someone tell me where my mistake is ? thanks
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 04:41
DarkGDK isn't going to STOP you from moving an object just because a collision happens. I know you set collision on and I'm not sure about what that command does - I think its the default - but who knows - (not me) anyways - I'm sure you need something in your main loop to test if the collision has happened or not - and its up to you to react to such things.

One trick is to save your "moving object's" position and angles x y z and xa ya za, then move your object, then test if it bumped something, if it did, then position it back where it was and the angles it was prior to the hit... using those values I told you to save before you move it.

this will ultimately give you the "I'm stuck - I CAN'T mave past this thing" problem you are looking for!

Login to post a reply

Server time is: 2024-11-20 07:28:52
Your offset time is: 2024-11-20 07:28:52