[SOLVED] Is there any " simple " way to handle sides of a platform bounce with forces?

I have a project where walls and edge of a platform apply force as well as a character with a charge jump whom also has force, and after the jump the force has to be still applied in the air, meaning he must bounce off other walls and platform sides (edges) but most stop when landing on the platform top surface.

I have a problem where player slides with a force applied when landed on the top of a platform , but when hit by other force ( this is possible as the current force is still applied seen on the video, getting hit into the wall and the force stops) or hit by a wall force or edge of a platform or any key pressed it stops the force and it works fine again, problem is shown in the video when clicked on the link , I don’t know the sequence exactly when that happens , as sometimes as I repeat the same actions it happens sometimes doesn’t as said before but as I tried few times, it seems to be more frequent when I hit the edge of the platform or when greater force than usual is applied ( many forces together ).


Here are all of my conditions that require force in order to work :

The first condition removes the force on every fall as it is set on 0, meaning every number higher than that will be taken as true.

The second condition is important otherwise when a space key is pressed and released as soon as possible the same problem which I am trying to currently remove happens as seen on the video that is why there is a short timer that registers the short key press and removes the force.

This events add force to player by an angle and bounce him up, this events have to run every frame because of the force.

Lastly, this events are points at the edge ( rectangular prism width*height area) , of each platform without the bottom points as it is already handled by the platform behaviour.

After taking a closer look again, i found out that this events are a problem,

Is there a more " simple " way to handle the side bounce since that was probably again too complex :confused:

maybe you could try the bounding box conditions?

like if player.left bounding box<platform.left boundingbox ecc…ecc…

The collision is fine in both events now just the force doesn’t stop when I want it to.

In your screenshots (i may be wrong) but u have not deleted your timer.It could be the case?
also u still miss a lot of trigger once


That was a part of a problem yet I as well don’t know if that was the main one, it might have been quite crowded in the background, I wouldn’t have notice that on my own. But I don’t know what you mean with ’ trigger once ’ for this specific events
, everywhere I would place the trigger it wont work anymore as excepted, while ignoring the timer as I already updated that one.

Because u don’t know how to prevent your event to be repeated again.= to u don’t know when to use trigger once.
Your game will never work without a full understand on how it works.
Without a trigger once your event will be repeated each frame, while when you trigger once 1 time only, but it doesn’t mean that everything will works again the next frame.

You should think of it like a loop, a loop that you must know how to close when one is open

Eg. your event
Timer space Key<=1 needs a trigger once, because the timer will keep going on since you have not closed the loop.
if key space key not! pressed
Trigger once ---------------------------delete timer space key.

Same with your permanent forces. I can’t test the whole thing, but if your using permanent forces they should be kept even the next frames…bcs wel…they’re permanent until stopped (and this could be ur problem) same for your pointD checks.
At least this is what i would do.
"Forcing your events to run each frame if its not needed. it’s never good.In the end, if an event works good with a trigger once, always use trigger once…
It doesn’t mean that it will fix your current issue, but for sure will help you a lot later.