Ignore:
Timestamp:
Sep 7, 2013, 8:54:56 PM (7 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
rebase_source:
cdd727daf77daf7fa6e98530527ea7423b87cab8
Message:

Tweak gravity well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r570 r575  
    750750    def apply_effect(self, object_to_move):
    751751        movement = self.physicser.position - object_to_move.physicser.position
    752         local_force = self.force * (1 - (self._radius / movement.length))
     752        local_force = self.force * math.sqrt(
     753            object_to_move.get_shape().body.mass)
    753754        movement.length = local_force
    754         object_to_move.environmental_movement(-movement)
     755        object_to_move.environmental_movement(movement)
    755756
    756757    @classmethod
Note: See TracChangeset for help on using the changeset viewer.