set gravity scale not working for me

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

Hey guys, i have something weird happening.

I have two objects, one ball and one platform, booth the same object, same properties, same everything. when i click in determinated area, they should fall. i change the gravity scale of the two objects, but just one falls.

see image bellow

i tried change the order of the code, but dont matter what i do, only Ball will respond to the set_gravity_scale, GravityPlatform will not move… any ideas?

Are you sure you didn’t set GravityPlatform mode to Static ?
I don’t have enough information to help you here. Check both objets inspectors to check that every parameter is the same.

Matt_UV | 2016-06-02 14:23

hey @Matt sorry for the delay. I figured it out. uncheck the can sleep property solved my problem. The ball was touching an object and the platform dont, soh when i changed the gravity scale the ball moves but the platform dont because she was “asleep”.

tiernich | 2016-06-06 05:40

:bust_in_silhouette: Reply From: aggregate1166877

I am unsure why this is, but I had a situation like yours where setting project gravity to 0 and node gravity scale to 0 made no difference.

In my case I managed to resolve the problem by changing from a CollisionShape to a CollisionPolygon. Only one object was ignoring gravity for me, so this was a viable work-around.