From 9f48aa45adb34e03f42d8960fa6d47c5e8b061ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 23 Jun 2015 15:02:28 +0200 Subject: BGE: added clamping of angular velocity. Angular velocity clamping was missing from the BGE. It is implemented similarly to the linear velocity clamping. It is needed to be able to drive physical simulations of systems that have a limited rotational speed. Reviewed by: campbellbarton, panzergame, ton Differential Revision: https://developer.blender.org/D1365 --- source/blender/editors/object/object_edit.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 2681a1f8de0..3499a3cc364 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -905,6 +905,8 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) base->object->rdamping = ob->rdamping; base->object->min_vel = ob->min_vel; base->object->max_vel = ob->max_vel; + base->object->min_angvel = ob->min_angvel; + base->object->max_angvel = ob->max_angvel; if (ob->gameflag & OB_BOUNDS) { base->object->collision_boundtype = ob->collision_boundtype; } @@ -2044,6 +2046,8 @@ static int game_physics_copy_exec(bContext *C, wmOperator *UNUSED(op)) ob_iter->rdamping = ob->rdamping; ob_iter->min_vel = ob->min_vel; ob_iter->max_vel = ob->max_vel; + ob_iter->min_angvel = ob->min_angvel; + ob_iter->max_angvel = ob->max_angvel; ob_iter->obstacleRad = ob->obstacleRad; ob_iter->mass = ob->mass; copy_v3_v3(ob_iter->anisotropicFriction, ob->anisotropicFriction); -- cgit v1.2.3