AddForce applies so high forces on low frame rates

Hi everyone, I am working now on sliding movement and everything was great until I checked if the logic I wrote works on low frames or not.
I got shocked when I got launched so far away that it’s like 10 times the value I set up :slightly_smiling_face:, after some searching, I found that AddForce uses frame rates to achieve it, which could be different from player to player.
The question is what should I use to prevent this issue, i tried to fake forces, like using curves to manipulate velocity and breaking deceleration, but I think it’s not the best way.

hi,
do you apply addforce each tick? you could try to multiply the force with delta time, so you can get frame independent movement.

hope it helps

cheers :vulcan_salute:

No, what I am doing here is adding force first, then starting a timeline to slowly back to Running state.


like this.

Anyway, thank you

how is the alpha driven? maybe you could make a blend variable and add delta time to it. so it should take longer on high fps to lerp and should be pretty fast on low fps.

cheers

delta time is the time it takes to render a frame, so if you have less frames it will be higher and lower on greater fps. it´s like a scaler and it works in almost every chase if you do not want frame rate to influence your logic.

hope it helped you :slight_smile:

have a nice day!

cheers :vulcan_salute:

This topic has been moved from International to Character & Animation.

When posting, please review the categories to ensure your topic is posted in the most relevant space.