Prototype--Week1--Movement


Working out our snails movement is one of the core elements of our prototype, we looked a few different methods to move a character in unity and I've outlined some of the pros/cons of each and why we decided on the method we finally used.


Moving Foward
First we looked at using the unity character controller, this provides great flexibility and already has many methods build in, is quick and easy to setup. The biggest downside is this requires a capsule collider that cant be overridden and is really only fit to use for humanoid type characters, so it did not fit our snail at all and ultimately was unusable. 

The next logical step is to use a rigidbody and the physics system, there are several methods to move a character with a rigid body including addforce, velocity, or rigidbody.moveposition. 
Addforce does exactly as described and adds force to a object over time, its great for realistic physics simulations, but didn't fit the feel of a acardey party racing game.
Velocity applies a constant force and would be suitable for this purpose except for a major factor; one of our core concepts is that physics dont behave as expected, crashing speeds you up ect.. this means that we dont want any of unitys built in physics as they all need to be overridden to behave as our needs require.
So the final method available is the rigidbody.moveposition(). This functions extremely similar to unity's character controller.move method, you give it a position, and and direction and it moves in the direction.

Our prototype is utilizing this moveposition method which has some benefits and some negatives.
This method has no inbuilt physics that needed to be overridden, crashing doesn't slow you down, or apply any sort of friction.
It does result in a bug when hitting colliders at high speed, you can end up clipping straight through them as if they weren't there.
As this is the week 1 prototype, everything is subject to change and this may not be the final movement system used.

Whats around the corner
The next major hurdle with our movement is how should the character turn?
The best way now we have our snail driving forward is to turn as if being steered, its supposed to be a racer after all. 
This is done with the moverotation function, similar to move position, we give it a rotation, and multiply it by a amount to move.

Looking ahead some kind of drift or sideways movement when turning could add a extra element to our driving and make it feel move interesting.


Leave a comment

Log in with itch.io to leave a comment.