Page MenuHome

BGE physics: get/set linear and angular damping
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Dec 12 2014, 3:07 PM.

Details

Summary

This patch adds the following R/W properties and method to KX_GameObject:

  • linearDamping -- get/set linear damping
  • angluarDamping -- get/set angular damping
  • setDamping(linear, angular) -- set both simultaneously

These allow runtime changes to the same properties that are accessible at design time in Blender's UI via game.damping and game.rotation_damping. The names of the properties were chosen to mirror the internal names of the BGE physics engine, as these are (AFAIK) also the commonly used names in physics literature.

Diff Detail

Repository
rB Blender

Event Timeline

inactive account (sybrenstuvel) retitled this revision from to BGE physics: get/set linear and angular damping.
Campbell Barton (campbellbarton) edited edge metadata.

Can go into 2.74. (not accepting new features for 2.73)

This revision is now accepted and ready to land.Dec 13 2014, 8:46 PM

Thanks for accepting the patch. Is there anything further I can/should do? Or is it just a matter of waiting until someone with commit access handles this?

Campbell Barton (campbellbarton) requested changes to this revision.EditedDec 16 2014, 11:26 AM
Campbell Barton (campbellbarton) edited edge metadata.

No code changes are needed, once 2.73 is released this can go into master,

However this patch misses API doc edits in doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst

This revision now requires changes to proceed.Dec 16 2014, 11:26 AM

Updated patch to include documentation.

This revision was automatically updated to reflect the committed changes.

Committed; discussed this with Campbell on IRC, so he's OK with it even though the status still reads "rejected prior diff"