ENTRY | DOWNLOAD | MANUAL | ONGOING | |
rotTo()Rotates an element to x, y, z degrees on the corresponding axis in the parent element's coordinate system. Optionally this method also takes a Tween object. Tweens are carried out over the duration of multiple frames. >> The class reference elaborates on Tweens.
<camera>.rotTo(x, y, z)
<sprite>.rotTo(x, y, z) <tag>.rotTo(x, y, z) <tag>.rotTo(z)
<camera>.rotTo(tweenobj)
<sprite>.rotTo(tweenobj) <tag>.rotTo(tweenobj)
Relevant examples: tag.py , sprite.py , tag_all.py , sprite_all.py , ALL In ContextImmediatedef onSetup(self): self.camera.rotTo(0.0, 15.0, 0.0) s = ASpriteClass(self, 'sprite1') s.rotTo(0.0, 90.0, 0.0) t = ATagClass(self, 'tag1') t.rotTo(180) Tweensfrom slut.element import Tween def onSetup(self): self.camera.rotTo(Tween(0.0, 0.0, -90.0, 2.0)) from slut.element import Tween s = ASpriteClass(self, 'sprite1') s.rotTo(Tween(90.5, 0.0, 0.0, 2.0)) from slut.element import SineTween t = ATagClass(self, 'tag1') t.rotTo(SineTween(0.0, 0.0, 45.0, 2.0)) |
|
Initiated by Stephan Hechenberger Thanks to CADRE's 103 |