diff options
author | Jorge Bernal <jbernalmartinez@gmail.com> | 2014-07-15 04:36:56 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2014-07-15 05:30:27 +0400 |
commit | 1bf87fa26c6763ef282ec39b07b678723a7f389b (patch) | |
tree | 14dcf327183bc94347f64c57fcfb26a002fee963 /source/blender/makesdna | |
parent | 50d30148b63212d4249b6e2aa97a5802557a9b6e (diff) |
BGE: TrackTo actuator: increasing up & track axis options
This is related to Task T34861 to increase up & track axis options for TrackTo actuator. I've just added it to differential to facilitate an easier review.
With the patch applied you can select X, Y and Z axis for the Up axis, and X, Y, Z, -X, -Y and -Z for the track axis.
Related to the implementation I have used the algorithm from Trackto constrain placed in constrain.c but adapted to be used with MOTO library.
The wiki docs are here (http://wiki.blender.org/index.php/User:Lordloki/Doc:2.6/Manual/Game_Engine/Logic/Actuators/Edit_Object#Trackto_Actuator).
Test file is here: {F97623}
I have also uploaded 2 screenshots showing the UI modifications to the TrackTo actuator:
{F91992} {F91990}
Reviewers: moguri, dfelinto
Reviewed By: moguri
CC: Genome36
Differential Revision: https://developer.blender.org/D565
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_actuator_types.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 5ab799a75e5..7698d671117 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -97,6 +97,8 @@ typedef struct bEditObjectActuator { float mass; short localflag; /* flag for the lin & ang. vel: apply locally */ short dyn_operation; + short upflag, trackflag; /* flag for up axis and track axis */ + int pad; } bEditObjectActuator; typedef struct bSceneActuator { @@ -439,6 +441,19 @@ typedef struct bActuator { /* editObjectActuator->flag */ #define ACT_TRACK_3D 1 +/* editObjectActuator->upflag */ +#define ACT_TRACK_UP_X 0 +#define ACT_TRACK_UP_Y 1 +#define ACT_TRACK_UP_Z 2 + +/* editObjectActuator->trackflag */ +#define ACT_TRACK_TRAXIS_X 0 +#define ACT_TRACK_TRAXIS_Y 1 +#define ACT_TRACK_TRAXIS_Z 2 +#define ACT_TRACK_TRAXIS_NEGX 3 +#define ACT_TRACK_TRAXIS_NEGY 4 +#define ACT_TRACK_TRAXIS_NEGZ 5 + /* editObjectActuator->flag for replace mesh actuator */ #define ACT_EDOB_REPLACE_MESH_NOGFX 2 /* use for replace mesh actuator */ #define ACT_EDOB_REPLACE_MESH_PHYS 4 |