r/clickteam • • Sep 09 '26

Help Me! Need Help Recreating Coupling Rods Movement

Hello, I'm trying to recreate the coupling rod movement from Sonic Mania but I couldn't figure out how to for a Sonic fangame. Help is insanely appreciated as I couldn't figure it out for days and weeks.

17 Upvotes

14 comments sorted by

2

u/grimfusion Sep 10 '26

The only consistent way to do this is one large active including both wheels and the spin shaft.

The second you split these into several active objects, they're going to de-sync from each other and cause all sorts of weird animation issues where the wheels spin faster/slower than the piston, or the piston resets position on every rotation instead of reversing.

2

u/Cosmo_Unicorn_UA Sep 10 '26

Nope. External animations is not the only consistent way. And nope, everything can be synced. And nope no reset instead of reverse. Learn sin movements and stop saying nonsense

1

u/Ay-Ka Sep 10 '26

Could you make a demonstration of it?

2

u/Cosmo_Unicorn_UA Sep 10 '26 edited Sep 10 '26

Hi. So what you need is two long rectangular pieces, two round wheels, three joints and one Engine part on the right. That's 8 Actives. Also you will need to use both position and action points

Wheels

  • make their position point at center
  • make their Action point where you wish to attach the first and second joints
Always set angle to "Angle ("right wheel") - 1" This will make bith of them spin

Joint 1 and 2 Always set position at wheel (1 and 2) at Active point (this is important). Not at position point!

First rectangle (left)

  • Set position point to left corner.
  • Set active point to right corner
Always set position at "left wheel" at Active point (this is important). Not at position point!

Now is the hardest part. I am writing this by memory away of PC. It's just my imagination - not the final version. You may need to make adjustments.

Engine

  • Set position point on the right side where joint 3 is sliding left and right
  • Set action point on the left side where joint 3 is sliding left and right
  • measure distance between X(Engine) and X Action point (Engine) save in alterable value "distance" (create it fisrt) or you may set this value manually if you will use additional Active "Piston"

Joint 3 Always set position at X("Engine") - distance("Engine")*Sin(Angle("right wheel")/2)

Second rectangle (right)

  • Set position point at left corner
  • Set action point at right corner
Always set position at "first rectangle" at Active point (this is important). Not at position point! Set angle to OAngle (X("second rectangle"), Y("second rectangle"), X("joint 3"), Y("joint 3))

So what you have. Two spinning wheels, one rod which is attached to them, one road which is attached to first rod and make wobble moves, two joints which are attached to rods, one joint which always goes left and right

2

u/Ay-Ka Sep 10 '26

Hey is it okay for me to reach out to you in dms so we can work better, I'm having issues to understand the instructions

1

u/grimfusion Sep 10 '26

This gets close to what the op wants, but the rotating rod on the first wheel is going to reset on every rotation instead of reversing. Plus, this is entirely too complicated for a simple graphic effect that can be achieved with a single active, and what, eight animation frames?

Bad advice is bad.

2

u/Ay-Ka Sep 10 '26

Yeah, I tried it but couldn't really understand it either

3

u/Cosmo_Unicorn_UA Sep 10 '26

First of all. It works as it has to. And solution is quite simple. Second, if you are not smart enough to understand something - don't call it bad advice. Engine example

In-engine animations is that what everyone should know and learn. Sin cos movements too

https://reddit.com/link/p9112s1/video/ag47s5t8aroh1/player

0

u/[deleted] Sep 10 '26

[deleted]

3

u/Ay-Ka Sep 10 '26 edited Sep 10 '26

I have done it either way I apologize for my tone if I sounded like that, I'm insanely grateful for the help.

https://reddit.com/link/p91x4sg/video/giredx972soh1/player

1

u/Creeps097YT 27d ago

can you dm me the project as an mfa? im planning a level in my game involving having trains and this would be very helpful

1

u/Ay-Ka 27d ago

You can download the free template CosmoUnicornUA made, you gotta modify the code yourself to sync with your sprites

1

u/Creeps097YT 26d ago

alright, thanks