Blender Git Loki

Git Commits -> Revision ed8dc78

Revision ed8dc78 by Sybren A. Stüvel (master)
January 15, 2015, 17:37 (GMT)
BGE physics: get/set linear and angular damping

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.

Reviewers: campbellbarton

Projects: #game_physics

Differential Revision: https://developer.blender.org/D936

Commit Details:

Full Hash: ed8dc78691063f37eb411d1b2e095183a0a94dd5
Parent Commit: b675418
Lines Changed: +171, -0

6 Modified Paths:

/doc/python_api/rst/bge_types/bge.types.KX_GameObject.rst (+30, -0) (Diff)
/source/gameengine/Ketsji/KX_GameObject.cpp (+76, -0) (Diff)
/source/gameengine/Ketsji/KX_GameObject.h (+11, -0) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp (+41, -0) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.h (+7, -0) (Diff)
/source/gameengine/Physics/common/PHY_IPhysicsController.h (+6, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021