Search Instagram Twitter Facebook Spotify Grid Tag Date Folder Chat Pencil

Tweaking Rotation Movement In-Game

One issue I’ve been dealing with on and off is trying to get the feel of rotating to a wall right.

Problem is that I’ve been working on the game for so long and looking at it so closely that I honestly don’t know what feels good and what doesn’t anymore. I’ve gotten pretty used to the placeholder rotation movement that I implemented a long time ago, but that doesn’t mean that that’s the right feel.

I’m going to start testing it at soon, and at GDC next week, I’d like to be able to show it to people and get feedback.

To this end, I’ve set up the console to allow for in-game tweaks of the rotation.

Curve

I switched to using an animation curve for the rotation, instead of using slerp (which as it turns out, I was actually using incorrectly). I could have written a smoothing function, but I decided to go with a curve since that allows me more control, and I don’t have to worry about the math.

For testing purposes, I have made fives curves:

Concave, convex, linear, and S are all standard animation curve shapes that come with Unity. I include them primarily as reference points. Custom is one I made that is a starts of concave, and then ends linear. It’s the one I feel works best, but it’s always important to have comparisons.

Concave:

Convex:

Linear:

S:

Custom:

S curve feels pretty good as well. The problem I find is that because the curve plateaus out in the end, when the player comes out of the rotation, their speed goes to 0, where has this stop and go effect. With custom, concave, and linear, it just goes straight into forward movement from rotation.

I also take into account initial speed (the fast you’re moving when you rotate, the faster the rotation is), as well as a time divisor (just a way to slow down or speed up the rotation time overall). Both how much the initial speed is accounted for, as well as time change can be changed as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.