playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Download the
Ecosystem Browser
to find new actions, samples. etc.
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Collision event problem with jumping.
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Collision event problem with jumping. (Read 1876 times)
volcank
Playmaker Newbie
Posts: 34
Collision event problem with jumping.
«
on:
July 19, 2018, 04:57:05 PM »
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!
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Collision event problem with jumping.
«
Reply #1 on:
July 20, 2018, 04:10:10 AM »
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
Logged
volcank
Playmaker Newbie
Posts: 34
Re: Collision event problem with jumping.
«
Reply #2 on:
July 20, 2018, 07:38:58 AM »
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!
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Collision event problem with jumping.
«
Reply #3 on:
July 20, 2018, 05:56:14 PM »
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.
Logged
Join the PlayMaker Discord Channel!
volcank
Playmaker Newbie
Posts: 34
Re: Collision event problem with jumping.
«
Reply #4 on:
July 21, 2018, 06:55:00 AM »
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
Logged
djaydino
Administrator
Hero Member
Posts: 7616
Re: Collision event problem with jumping.
«
Reply #5 on:
July 22, 2018, 02:26:15 PM »
Hi.
Maybe a float clamp can help?
Logged
Join the PlayMaker Discord Channel!
volcank
Playmaker Newbie
Posts: 34
Re: Collision event problem with jumping.
«
Reply #6 on:
July 31, 2018, 12:21:11 PM »
Hi actually I have tried that before but now I only used float clamp and seems to make the trick but still need to test. So I apply float clamp right after I add the Y force to my object. So my jumppower is a float called "jumppower" and I set minimum to 0 and maximum to 500 and I say everyframe. Then I use Next frame event after that to go back to start state. Could that make the trick?? Thank you for the advice.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
Collision event problem with jumping.