ENTRY | DOWNLOAD | MANUAL | ONGOING | |
orbitBy()Orbits an element by x, y, z around the corresponding axis relative to the element's current rotation. Orbits are always around the origin of the parent element's coordinate system. If the element was not moved off the origin then orbits are equivalent to rotations. Optionally this method also takes a Tween or Thrust object. Tweens and Thrusts are carried out over the duration of multiple frames. Tweens stop at a predefined end value after a predefined time. Thrusts are carried out until canceled. >> The class reference elaborates on Tweens and Thrusts.
<camera>.orbitBy(x, y, z)
<sprite>.orbitBy(x, y, z) <tag>.orbitBy(x, y, z) <tag>.orbitBy(z)
<camera>.orbitBy(tweenobj)
<sprite>.orbitBy(tweenobj) <tag>.orbitBy(tweenobj)
<camera>.orbitBy(thrustobj)
<sprite>.orbitBy(thrustobj) <tag>.orbitBy(thrustobj)
Relevant examples: tag.py , sprite.py , tag_all.py , sprite_all.py , ALL In ContextImmediatedef onSetup(self): self.camera.orbitBy(0.0, 90.0, 0.0) s = ASpriteClass(self, 'sprite1') s.orbitBy(0.0, 90.0, 0.0) t = ATagClass(self, 'tag1') t.orbitBy(180) Tweensdef onSetup(self): self.camera.orbitBy(Tween(0.0, 90.0, 0.0, 2.0)) s = ASpriteClass(self, 'sprite1') s.orbitBy(Tween(90.5, 0.0, 0.0, 2.0)) t = ATagClass(self, 'tag1') t.orbitBy(SineTween(0.0, 0.0, 45.0, 2.0)) Thrustsdef onSetup(self): self.camera.orbitBy(Thrust(0.0, 45.0, 0.0)) s = ASpriteClass(self, 'sprite1') s.orbitBy(Thrust(30.0, 0.0, 0.0)) t = ATagClass(self, 'tag1') t.orbitBy(FadeinThrust(30.5, 0.0, 0.0)) |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |