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 / Trying to do a collide with stairs using a rotated object

Author
Message
yahya
16
Years of Service
User Offline
Joined: 16th Oct 2008
Location:
Posted: 9th Jun 2009 03:10
Long story short I imported a FPSC map to Dark GDK, I didn't know how to make the character collide with the map's objects a lone, so I added a square on every part of the game for the character to collide with(about 50 :S).

I know there might have been a much MUCH better way, but I needed something to be done at a certain time as fast as possible, now all I need is for the character to use the stairs, so for the character to collide with the stairs I did :



Then put the object on top of the stairs.

But I don't know how to code the idea, of him "when colliding with stairs from down to go up and from up to go down"
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 9th Jun 2009 15:24
Are you using sparky's collision or the in built collision? If the inbuilt, do a forum search for Sparky's

yahya
16
Years of Service
User Offline
Joined: 16th Oct 2008
Location:
Posted: 13th Jun 2009 04:55
ya am using sparky's collision
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 13th Jun 2009 09:52 Edited at: 13th Jun 2009 09:53
Do something in your collision code like this:

If player collides with wall move him up a few units and retry collision. If the "wall" the player is colliding with is some stairs then the collision should pass and then he will move up a step, if its a regular wall, moving him up the few units shouldnt be enough to get him over the wall so it would'nt work like stairs (it makes sense to me i might need to clear it up a bit though)

yahya
16
Years of Service
User Offline
Joined: 16th Oct 2008
Location:
Posted: 14th Jun 2009 05:38
Will thats kinda my plan and same time question, I really don't know how to do that with Dark GDK :S, the logic is there, but the method is not.
kklouzal
15
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 14th Jun 2009 06:27
Collision is sort of tricky at first, do a search in the tgc gdk forum for "collision" and sift through those there is bound to be an answer.

Login to post a reply

Server time is: 2024-11-25 08:25:11
Your offset time is: 2024-11-25 08:25:11