Does anyone know of a way to make an object rotate horizontally? As in how a quarter spins on its side?
Does anyone know of a way to make an object rotate horizontally? As in how a quarter spins on its side?
you add 90 to its angle to make it rotate one quarter of a circle counterclockwise once, or add -90 to rotate the other way (clockwise) once. keep adding 90 or -90 to rotate per quarter of a circle.
You can also go to image editor, right click on frame and select rotate and input how many rotated frames to make and whether it is clockwise or counter clockwise

Not what he means...
![]()
oh, I'm sorry I misunderstood what you meant. My bad. I believe that's should be on the sprites themselves and can't be done through events.

Basically, I think you have the following options:
* You can animate the rotation, and draw each frame by hand - see pic above (probably the best solution for small objects, such as coins).
* You can use a shader - eg. http://1drv.ms/MpGquE (only works for flat objects)
* You can create a 3d model, pre-render it from various angles, and then create an animation from that (for rotating small pixel art, voxel models may be an option - see below).
![]()


If it's a flat object (like a quarter) you might be able to cheat it using X Scale. However I would recommend just animating it.
Always: Set X Scale to abs( cos(timer/1000.0) )
timer is the count in milliseconds from the start of the frame. Dividing by 1000 will give a wavelength of 1 second, meaning the coin would take 1 second to return to the side it started.
Hey guys thanks for the replies, i found a way to do it. Somewhat similar to how Jacob mentioned
I set an internal flag of 0 to subtract -0.25 every 02 sec then set an event in a little over 2 seconds to turn the flag on and add +0.25 to the scale. Then every 4 seconds just toggle the flag and it worked greatThanks for the input guys!


That way will result in a hard change in speed when it gets to the outside though, which is fine if that's what you want. You can copy what I wrote verbatim into the expression editor though, and it should result in a smoother rotation. Replace timer/1000.0 with timer/4000.0 to make it take 4 seconds instead of 1
Thanks Jacob! I'll definitely give that a go! What i was using it for was simple background effects like snowflakes to start out with. I appreciate all the input folks, as always, clickteam forum to the friggin' rescue haha.