Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1227 for code/trunk


Ignore:
Timestamp:
May 3, 2008, 9:05:19 PM (17 years ago)
Author:
rgrieder
Message:

ha, found you! buggy little bug!

  • When setting the rotation axis of a WorldEntity to a non normalised vector, things get very weird when it comes to rotating, as we have observed…

—> Strange asteroid rotation problem has been resolved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/WorldEntity.h

    r1056 r1227  
    155155
    156156            inline void setRotationAxisLoader(const Vector3& axis)
    157                 { this->rotationAxis_ = axis; }
     157                { this->rotationAxis_ = axis; rotationAxis_.normalise(); }
    158158            inline void setRotationAxis(const Vector3& axis)
    159                 { this->rotationAxis_ = axis; }
     159                { this->rotationAxis_ = axis; rotationAxis_.normalise(); }
    160160            inline void setRotationAxis(Real x, Real y, Real z)
    161                 { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
     161                { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; rotationAxis_.normalise(); }
    162162            inline const Vector3& getRotationAxis() const
    163163                { return this->rotationAxis_; }
Note: See TracChangeset for help on using the changeset viewer.