[Solved]How do I rotate a squished sprite

Get help using Construct 2

Post » Wed Oct 18, 2017 12:09 pm

The picture explains it all:
Image

I have a round sprite (clock) that I need to rotate and display slightly squished, but only vertically.
Is there an easy way to do it?

I can't use Paster or similar plugin because I have lots of image points defined on the clock and I need to be able to read their coordinates.
Last edited by dop2000 on Wed Oct 18, 2017 12:46 pm, edited 1 time in total.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,747
Reputation: 67,315

Post » Wed Oct 18, 2017 12:26 pm

I know it's not ideal, but, could you rotate it by using an animation? That way you would just squish it normaly and play the animation.
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 717
Reputation: 3,996

Post » Wed Oct 18, 2017 12:28 pm

No, I need a smooth tweened rotation. I actually only care about the movement of image points, the sprite itself is invisible :)
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,747
Reputation: 67,315

Post » Wed Oct 18, 2017 12:36 pm

If the sprite itself is irrelevant, why not using several sprites as imagepoints and make them move in an ellipsoidal path?
Bruno

I like to eat, but I'm no cook. Why liking to play games would make you a game designer?
B
22
S
6
G
3
Posts: 717
Reputation: 3,996

Post » Wed Oct 18, 2017 12:40 pm

Thanks for the advice, I just found an easy solution.
I can get "squished" position of each image point using this formula:
squishedX = Sprite.x + (Sprite.ImagePointX(1)-Sprite.x)*squishFactor
squishedY = Sprite.ImagePointY(1)


It always helps to try to explain the problem to someone :)
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
126
Posts: 1,747
Reputation: 67,315


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 29 guests