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.

Author
Message
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 1st Jan 2014 19:35
Hi and Happy Christmas.

I want my character could go up the ladder. But I don't for get up the ladder should add collision between ladder and character or no?

Thanks
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 1st Jan 2014 20:49 Edited at: 1st Jan 2014 20:57
I Find it. should use GetSpriteCollision (Sprite1, Sprite2) Function for detect collision.
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 2nd Jan 2014 22:47
I have a Problem with Collision when my character collide with another sprite. (e.g Box)
I want when My character Collide with box could move it. for this work I use SetSpritePhysicsOn ( ) Function for my character and box sprite. But when my Character once collide with it, the Box sprite move very faster than character. where is the Problem?

Thanks
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 2nd Jan 2014 22:55
Ummmmmm, try SetSpritePhysicsMass() (Make the character weigh less), or maybe SetSpritePhysicsRestitution() (Make the box less bouncy)

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jan 2014 04:55
It would really help to see some code.

If, in your basic loop, you kept resetting the physics, this might interfere with the performance.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 3rd Jan 2014 08:33
this is my code :

Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 3rd Jan 2014 12:42
Sounds like you just need to add some friction to your box sprite (spr3). Try adding these two lines see if it helps;

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 3rd Jan 2014 14:51
I find that SetSpritePhysicsRestitution() (as E.Bunny says), setting that to a fairly low number 0.01 maybe, that will reduce the amount of force that the sprite inherits. So nudging against it should shove it just a little.

I am the one who knocks...
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 3rd Jan 2014 15:43
Thanks.

Could You More Explanation about two Functions?
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 3rd Jan 2014 19:11
I don't good understand what is SetSpritePhysicsCanRotate () function work.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jan 2014 19:54
This might help.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 3rd Jan 2014 21:21 Edited at: 3rd Jan 2014 21:25
already see it in AppGameKit Document but I don't understand what is Mean form rotate the sprite at below Sentence:

Quote: "
Sets whether the physics simulation is allowed to rotate the sprite
"
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Jan 2014 22:41
It means that when you use physics and let it handle how a sprite reacts to forces and bounces and such, the sprite will also spin (rotate) if hit the right way. If you disable it (use zero), than it won't spin.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Behdadsoft
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: Tehran-Iran
Posted: 4th Jan 2014 16:11
Thanks Now Understood.

Login to post a reply

Server time is: 2024-05-02 14:59:34
Your offset time is: 2024-05-02 14:59:34