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 / Buggy collision function

Author
Message
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 22nd Jan 2010 21:23
I have been reading the Sparky's info, and tried to impliment a basic collision. My first code was adequate:

But I cannot slide along walls, etc. After looking at Sparky's code, I tried this:

But whey the player collides with anything, it is set to 0, 0, 0. Any suggestions on a more effective code would be apreciated.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 22nd Jan 2010 22:54 Edited at: 23rd Jan 2010 00:06
Sorry I can't help, not done much with sparkys.

Thought it was a good opportunity to plug my plug-in, you don't need to handle your collisions manualy, its all done for you.

http://forum.thegamecreators.com/?m=forum_view&t=163701&b=22
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 2nd Feb 2010 04:46
Thank you matty, I will look at that. I also have Dark Physics which is a wrapper for physX, but have not tried that yet either.

I still hope that with a simple tweak, Sparky's can put the object in the correct place, (i.e. not 0,0,0). Perhaps it would help if I shared the fullness of my code. Here it is:

I believe that the bug is in the collision() function, possibly with the implimentation of Sparky's.

Please, if anyone could look at this and help me find this bug I would really apprciate it.

ThanX.
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 8th Feb 2010 11:11
Pogress!! When I abandoned a seperate collision() function and placed collision in the move() function, it works pretty well. Code as follows:

Still have some difficulty moving about in smaller complex objects. Is this related to the SC_SphereSlide() function?

Thanks for your help.

Login to post a reply

Server time is: 2024-10-01 23:34:27
Your offset time is: 2024-10-01 23:34:27