diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-10-16 15:41:50 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-10-16 15:41:50 +0400 |
commit | 7b2567924b9b86961cd4c07b76653f49939cab1c (patch) | |
tree | adcf1091db6f3f78c05c6b02c567a9b77fc10092 /source/gameengine/SceneGraph | |
parent | 063982914038ecd578bab7849a1e94cccbb8d8b9 (diff) |
Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware.
Keyboard sensors can now hook escape key. Ctrl-Break can be used from within blender if you've forgotten an end game actuator.
Fixed a stupid bug preventing some actuators working (like TrackTo).
Diffstat (limited to 'source/gameengine/SceneGraph')
-rw-r--r-- | source/gameengine/SceneGraph/SG_Spatial.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/gameengine/SceneGraph/SG_Spatial.cpp b/source/gameengine/SceneGraph/SG_Spatial.cpp index a91b462b3ae..6ad5cf9912a 100644 --- a/source/gameengine/SceneGraph/SG_Spatial.cpp +++ b/source/gameengine/SceneGraph/SG_Spatial.cpp @@ -47,15 +47,18 @@ SG_Spatial( ): SG_IObject(clientobj,clientinfo,callbacks), - m_localPosition(MT_Point3(0,0,0)), - m_localRotation(1,0,0,0,1,0,0,0,1), + m_localPosition(MT_Point3(0.0,0.0,0.0)), + m_localRotation(MT_Matrix3x3(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0)), m_localScaling(MT_Vector3(1.f,1.f,1.f)), - m_worldPosition(MT_Point3(0,0,0)), - m_worldRotation(0,0,0,0,0,0,0,0,0), + m_worldPosition(MT_Point3(0.0,0.0,0.0)), + m_worldRotation(MT_Matrix3x3(1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,1.0)), m_worldScaling(MT_Vector3(1.f,1.f,1.f)), - m_parent_relation (NULL) + m_parent_relation (NULL), + + m_bbox(MT_Point3(-1.0, -1.0, -1.0), MT_Point3(1.0, 1.0, 1.0)), + m_radius(1.0) { } @@ -302,7 +305,9 @@ void SG_Spatial::SetBBox(SG_BBox& bbox) MT_Transform SG_Spatial::GetWorldTransform() const { - return MT_Transform(m_worldPosition, m_worldRotation.scaled(m_worldScaling[0], m_worldScaling[1], m_worldScaling[2])); + return MT_Transform(m_worldPosition, + m_worldRotation.scaled( + m_worldScaling[0], m_worldScaling[1], m_worldScaling[2])); } bool SG_Spatial::inside(const MT_Point3 &point) const |