Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Manuel

Hi, i'm makingf a game and I really want to know how to assig gravity only to one entity not global in the main class, this is because my buttons also are entites and if i put global gravity everithing is going down, i just want the gravity for the main player.

Thanks

1 decade ago by Montana

.gravityFactor

How much this entity is affected by the gravity set in the game class. A .gravityFactor of 0 will make the entity float, no matter what the game's gravity is set to. The default is 1.

1 decade ago by dominic

You can also overwrite the Button&039;s #update() method, so that it does nothing instead of moving according to the physics:

update: function(){},

1 decade ago by Manuel

Can you give me an example to how to do that Please?

Thanks

1 decade ago by Manuel

@Montana your right, thanks a lote, it works
Page 1 of 1
« first « previous next › last »