PlayMaker Help & Tips > PlayMaker Help

Collision event problem with jumping.

(1/2) > >>

volcank:
Hi I am creating a project which ball automatically jumps by itself. So my basic events are I have a collision event and when collided with an object tagged (Platform) it adds force of 430. So basically I have a jumping ball and basically you tap screen to move forward. How ever in some of my tiled objects I have like 2 tiled platforms right next to each other and what happens is if ball falls right between the 2 paltforms it is affected by both colliders so jump force doubles and becomes 860 and jumps up too high. How can I get rid of this kind of glitch? I added a wait event of like 0.001 so it seemed to take it away somehow but still it happens during the game. Please check screenshots. I would appreciate your help.

Thank you!

jeanfabre:
Hi,

 you need to cap the maximum velocity of your ball.

 you get the velocity, then you max it out with 430, and then you apply the velocity again.

Or your ball has a timeout that do not accept new collisions x seconds after one.


 Bye,

 Jean

volcank:
Hi Jean I did what you said and it almost worked only even I set the velocity afterwards it still times out and ball doesn't jump second time. Could you check the screenshots and tell me where I am doing wrong? Thank you! :)

djaydino:
Hi.
Have you tried a 'Next Frame Event' or maybe set the wait a bit longer like 0.1 as from the image i see, i think the ball will never hit twice within that time.

volcank:
Hi thank you,

Seems Next Frame Event almost makes the trick just like wait option. Only when I continue to play it still if it collides like both objects at the same time it like rocket jumps in the air. I really don't know why. I think I need to find a way to keep that jump float valua constant like 500 or 450 always!

----------------------------------------------------------------

https://itunes.apple.com/tr/developer/volkan-kutlubay/id927603440
https://play.google.com/store/apps/developer?id=Volkan+Kutlubay&hl=en

Navigation

[0] Message Index

[#] Next page

Go to full version