Spinning Wheel Platform


Good day, all.

When I first started implementing moving platforms, there was an issue where the character would simply slide in place while the platform passes beneath them. Perusing the internet yields different suggestions as fixes, but I notice that a majority of them involve making the character a child of the platform while they're on it. That solution did not work out well for my game because of how I made my character controller, so I went the other route: calculating an offset of the 'ground object' and adding it to the position of the character. It has been working well so far.

There was only one problem: it does not work for ROTATING platforms, because the character's position is being calculated based on the ground object's position and disregards the ground rotation. The way I'm getting around this issue is by putting separate colliders on the rotating platform that act as separate ground objects:

As the main disk rotates, so do the colliders, so they basically are "moving platforms" rather than rotating ones, and the character is able to stay on the trajectory while standing on the disk. If the character was to stand on the disk itself, the sliding issue would remain.

Of course, the whole issue could probably be avoided by simply making the disk dangerous to step on:


This second workaround is probably only applicable to specific situations. In this particular scenario, I prefer it, honestly, as it adds a bit more challenge.

There are probably other solutions out there that involves calculating rotations and stuff, but I feel this is enough for my game for now.

TLDR: Add separate colliders to a rotating platform that act as individual 'grounds', so as the main disk rotates in place, these individual grounds become 'moving' platforms, allowing the character to follow their path.

Get Tikus Tales (Demo)

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.