translateOnAxis method
axis
- A normalized vector in object space.
distance
- The distance to translate.
Translate an object by distance along an axis in object space. The axis is assumed to be normalized.
Implementation
Object3D translateOnAxis(Vector3 axis, double distance) {
// translate object by distance along axis in object space
// axis is assumed to be normalized
_v1.setFrom(axis);
_v1.applyQuaternion(quaternion);
_v1.scale(distance);
position.add(_v1);
return this;
}