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 / Sliding Collision (Sparky) Movement Dilemma

Author
Message
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 8th Dec 2009 20:20 Edited at: 8th Dec 2009 20:25
hey i got a small (big) problem, the fact is, that i got this sliding collision thing working on my map, but there is a major flaw in the programming (either by me or the demo).

i have reviewed my code and ensured myself that the problem lies in the movement and checking collision function (which will be posted at the bottom of this post).

The dilemma is that the scale of the world is more vast than the demo, and therefore i am having problems getting my character to move at a more realistic speed, and still having working collisions (the problem with this is glitching through objects).

So what i have done is i made the movement in the demo *4 more effective, this also modified the collision calculations (which to me makes it seem that it will work).

My other option is to rescale the whole world relatively to the demo (which imo will be unneeded and a lot of work).

My code is a copy of the tutorial and follows:



Object 3 is the player, and all the objects that it is checking for collision stay STATIC.

To outline the problem, when you go up to a wall, it will repel you, but if you keep walking eventually (after about 2 seconds) it will kick you through the wall, and i conclude this is because of the amount it repels you.

TYVM in advance

(object used is attached, it is downloadable from a thread on this site)



Attachments

Login to view attachments
zydeoN
15
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 8th Dec 2009 21:11
So are you having problems with collisions if you scale the map ? If so, try to use SC_allowObjectScaling(Object_Num)
Hope this helps
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 9th Dec 2009 18:32
sorry i think i found the problem it was that the player moved faster than the collision radius meaning it moved through the object, i fixed it by increasing the radius



Login to post a reply

Server time is: 2024-11-20 09:18:21
Your offset time is: 2024-11-20 09:18:21