[Unity] Flight Camera Character Controller
Today, I'll show you a good exercise I made to manipulate quaternions. In extra you got a 3C structure for a flight game.
I chose to make a flight behavior because of rotation complexity. Today we always use physics to drive vehicles in video games, but this exercise is focused on quaternions manipulations, so all the behavior is driven by quaternions.
- Camera switch (FPS / TPS)
- Auto replace character rotation: 3 different ways to smoothly reset character rotation (All Axis, Per Axis, None)
- Q/D: roll
- Shift: boost
- Left click / Right click: dodge left / right (lateral movement with roll as in some Star Wars video games)
- Download Unity project
I chose to make a flight behavior because of rotation complexity. Today we always use physics to drive vehicles in video games, but this exercise is focused on quaternions manipulations, so all the behavior is driven by quaternions.
Main Features:
- Smooth TPS camera- Camera switch (FPS / TPS)
- Auto replace character rotation: 3 different ways to smoothly reset character rotation (All Axis, Per Axis, None)
Video
Controls:
- Z/S: pitch- Q/D: roll
- Shift: boost
- Left click / Right click: dodge left / right (lateral movement with roll as in some Star Wars video games)
Download:
- Download Windows standalone- Download Unity project
unity files?
ReplyDeleteIn the blog post, at the bottom:
ReplyDeletehttps://docs.google.com/uc?export=download&id=0B5Yr6yfvfio_YnR1RXc2SFh2b3M
Hello. the link expired
DeleteLinks just repaired ;)
Delete
ReplyDeleteI worked on the mobile controls for my space game for half a year and almost gave up.
And this is way better than what I got. Thanks a lot for this. :)
Glad that helped you ;)
DeleteKindly repair the link. I'm unable to download the file.
ReplyDelete