Example #1
0
        /**
         *  @brief Rotates game object based on provided axis, point and angle of rotation.
         **/
        public void RotateAround(TSVector point, TSVector axis, FP angle)
        {
            TSVector vector  = this.position;
            TSVector vector2 = vector - point;

            vector2       = TSVector.Transform(vector2, TSMatrix.AngleAxis(angle * FP.Deg2Rad, axis));
            vector        = point + vector2;
            this.position = vector;

            Rotate(axis, angle);
        }