Physics behaving differently across platforms

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Linny
:warning: Old Version Published before Godot 3 was released.

Hi there.
I’m currently working on my first project in Godot.
The project is aiming at different platforms (X11,Windows,Android)
and i noticed that sometimes the physicsengine (3d) is behaving differently across the platforms. For example:

I have a RigidBody object that gets thrown up in the air by another object (ball enters platform - platform moves upwards to throw the ball up).
On X11 it behaves as expected but on Android the ball gets thrown up in the air way higher than on X11.

Is this a bug , or am i missing something?

Greets
Linny

Is there an FPS difference between the two? Maybe that affects physics somehow (but theoretically it shouldn’t).
If you think this as serious gameplay issues, you could search or open an issue on Github about this.

Zylann | 2016-12-05 00:37

You are right. It seems to be related to the FPS.
I tested it across multiple Android devices (low end to High end).
On the Desktop the testscene is running at 60 fps constant and on the (sort of) low end devices, the fps drops to ~40. If i set set_target_fps AND the physics fixed_fps to 40, the problem is gone. Just limiting the Game FPS doesn’t make a difference.

But in my opinion, that shouldn’t be the case. Obiously i don’t know on which device a player will run the game on. Because of that, the engine should take care of this.

Btw. The Godot Version im running is the 2.1.1 stable (official build)

Thanks Zylann for pointing me in that direction :slight_smile:

Ps: Weird… The commenting function in here automatically removes the underscores at settargetfps but leaves them intact at fixed_fps ;D

Linny | 2016-12-05 08:39

Is weird, if you open a issue, try to add an example project and details on the devices that are showing the issue, could be related to the way server threads work.

eons | 2016-12-05 10:41

I already opened an issue on github. I will prepare an example scene as soon as i am back at my working computer tonight.

Linny | 2016-12-05 15:11

:bust_in_silhouette: Reply From: Linny

OK. Never mind. Found the Problem after i got a comment on Github.
I’ll leave the solution here, in case someone else makes the same “beginner” mistake.

I just forgot to set the animation players process mode from “idle” to “fixed”.
To be honest, i never noticed that this option is there.

Now the “Bug” is fixed :slight_smile:

*facepalm
(feels a little dumb now) *gggg

Thanks for the comments anyway.

Regards
Linny