Changeset 575:afe748673076


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.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • data/levels/crew

    r568 r575  
    373373- args:
    374374  - [2436, 2040]
    375   - 100
    376   - 600
     375  - 500
     376  - 200
    377377  classname: GravityWell
    378378lines: []
  • 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.