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 / Sparkys collision

Author
Message
robster
15
Years of Service
User Offline
Joined: 15th Dec 2008
Location:
Posted: 27th Nov 2010 14:42
Hi im using sparkys sliding collision and want my character to move slower any ideas?? thanks.

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 27th Nov 2010 16:08
What do you mean by move slower? SC_ doesn't make your character move....

The fastest code is the code never written.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Nov 2010 16:33
Are you just running one of the examples and you want to change the behaviour a little? If so, we may need to see the code.

If you are using the dbMoveObject() command then just move the object more.

robster
15
Years of Service
User Offline
Joined: 15th Dec 2008
Location:
Posted: 27th Nov 2010 17:22
ok heres the code

By move slower i mean not have object 1 in the code "glide?" so fast

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 27th Nov 2010 18:49 Edited at: 27th Nov 2010 18:59
When you do the sliding portion, use a multiplier:

EDIT:
You may also have a look at "SC_getCollisionNormalY()". I use that as a multiplier when the grade is too steep and my character needs to "slide" down.

The fastest code is the code never written.
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 27th Nov 2010 19:28 Edited at: 27th Nov 2010 19:29
Quote: "When you do the sliding portion, use a multiplier"


Your idea of using a multiplier is right but you put it in the wrong place. The way you've written, he will get incorrect collision. (The object will not move to the actual sliding position when colliding!)

The important part is where you set the new position to check for collision:



My suggestion is to put in a multiplier there to control the movement speed:



You could also use dbNewXValue() and dbNewZValue() to avoid all the sin and cosine stuff...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
robster
15
Years of Service
User Offline
Joined: 15th Dec 2008
Location:
Posted: 27th Nov 2010 19:30
Thanks guys il try this out

Login to post a reply

Server time is: 2024-06-30 10:22:28
Your offset time is: 2024-06-30 10:22:28