playMaker

Author Topic: Collision 2d event issues  (Read 818 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Collision 2d event issues
« on: March 13, 2021, 02:09:57 PM »
Hello, I am having weird issues with Collision 2d Events. When my character jumps off the ground and lands, sometimes it will work for it to go to the next state and sometimes it will not. If it does not work, I have to move my character left and right a little bit and then it will work. Very inconsistent and I wasn't sure if there is a way to smooth it out. Thanks!

John Bassi

MlleBun

  • Playmaker Newbie
  • *
  • Posts: 28
Re: Collision 2d event issues
« Reply #1 on: March 13, 2021, 03:07:28 PM »
Hello, I am having weird issues with Collision 2d Events. When my character jumps off the ground and lands, sometimes it will work for it to go to the next state and sometimes it will not. If it does not work, I have to move my character left and right a little bit and then it will work. Very inconsistent and I wasn't sure if there is a way to smooth it out. Thanks!

John Bassi

Hi, could you post some screenshots of your states and actions on those states? It'll help the forum to guide you to solve your issue.

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: Collision 2d event issues
« Reply #2 on: March 13, 2021, 06:04:41 PM »
Sure. I have a get key down in the first state, a set velocity 2d in the second state, and a collision 2d event. I also have some waits and another set velocity 2d, but with a negative number. I have these things because I'm using an asset, which makes the jumping weird. But I was still having this problem in older projects without the additional waits and set velocity 2ds. So I think the important parts are what I took pictures of, but I thought I'd say it just in case. :)

Thanks!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Collision 2d event issues
« Reply #3 on: March 13, 2021, 06:10:59 PM »
Hi.
It might be better to use on Collision Stay.

if you would have a collision 'Before' you are on the state with the Collision event it will not trigger 'Enter' anymore as it already in collision.

in many cases i use a separate fsm with to states and use state 1 'stay' and state 2 'exit'
Then i also have a Set Bool Value on both states.

and on the other fsm i use fsm bool test (Ecosystem) instead of the collision event actions

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: Collision 2d event issues
« Reply #4 on: March 15, 2021, 11:04:05 PM »
On collision stay worked! Thanks!