[SOLVED] How do I reset an objects rotation?

As I understand it object:rotate(x) rotates the object based on its current rotation so object:rotate(0) wouldn’t do anything.

I assume doing the following should work

[lua]rot = object.rotation
object:rotate(rot*-1)[/lua]

but is there any “cleaner” way of doing this? [import]uid: 129450 topic_id: 23396 reply_id: 323396[/import]

The rotation property is both readable and writable, so you can directly define it as 0:

object.rotation = 0 [import]uid: 61899 topic_id: 23396 reply_id: 93742[/import]

Thanks clueless, wasn’t aware of that. [import]uid: 129450 topic_id: 23396 reply_id: 93788[/import]