Flying avatars in Unity

5 posts / 0 new
Last post
vcard
vcard's picture
Flying avatars in Unity
Undefined

Hi all,

Avatars that fly are important for Virtual World creators and users but Unity, out of the box, only provides walking avatar scripts and prefabs.  With fly we can explore virtual worlds in so many ways that a mere walking avatar is unable to provide. So, we have been working on a basic Fly Mode Kit to complement Unity's third person controller and add fly to your virtual world project. 

Flying avatars in unity

This Fly Mode uses 3 additional keys, standard in virtual world systems: 

  1. PageUp - lifts avatar up
  2. PageDn - pushes avatar down
  3. Home - Exits/enters fly mode.
    ...
  4. Other standard keys and controls (arrows, wasd, ...) work as usual to move in the same way (as with "walking" avatars). 

Demo scenery based on "Lake Race track" by Niandrei, Unity's asset store. Character based on superman hero101, submitted by dregenerator to free3d.com.

Flying Avatar DEMO: http://odisseia.babelx3d.net/unity3d/player_kit2bDemo3/index.html  

None of the standard Unity scripts where modified. All the functionality is achieved by additional scripts that add new features to standard behaviour. Tutorial info and project sources will be released as soon as possible.

Enjoy the demo and imagine the uses in your virtual worlds.

vcard

Visibility: 
Public - accessible to all site users
vcard
vcard's picture
Flying avatars in Unity - new features demo

Hi all,

This demo shows new features intended to simplify flight control and make it a bit more fun to use.

Flying avatars in unity

Fly dynamically using the mouse

Now we can opt to fly in an easier and more dynamic way to control direction (X, Y) using the mouse while holding the right click button. This accesses a mouse rotator camera mode that controls the avatar/player direction in X axis, on Walking mode and in both axis (X and Y) in flight mode.  Remember, no Y axis control by mouse unless we are in flight mode!
In this mode (holding right click while moving in flight) the mouse pointer becomes locked in the center of the screen to avoid going out the screen limits. This is technically a good solution but browser security pops an alert, very discrete and acceptable on chrome but quite "ugly" on firefox. Hope this will change in time or we may have to rethink it.
Opted here for right click holding to control flight instead of left click holding, or no click, to avoid usability conflicts with all those standard uses of the mouse left click (click on objects and options, firing in games, ...) that would be troubled by a ... wobbling screen.

Realign avatar with Camera

Camera rotators and zoom can, used with flexibility as we generally prefer, have the danger of eventually putting the avatar in a position where it is difficult to realign it with the camera; so we added a control that realigns on need by a click on mouse wheel or on [End] key.

Other ...

Other small improvements in the demo include parameter tuning and doubling controls on both sides of keyboard to simply the use by left-handed users or by ... both hands, for instance one controlling the direction on X, Y axis and the other controlling movement forward/backward (Z axis) while on flight. The interface show controls button gives all the new Keys and Controls addressing details. 

Flying Avatar DEMO 5: http://odisseia.babelx3d.net/unity3d/player_kit2bDemo5/index.html  

Enjoy!

vcard (aka Vitor Cardoso)

Alain
Alain's picture
export to sketchfab

as I said on facebook I wanted to try the exporter from Unity to sketchfab.

It is boring because all my old ( 4 or 5  years old ) unity files must be upgraded and it lost 80% of the scripts etc..

But I will tell you .....abnd.....If you have a better place for that , Mr admin , plz feel free to move me :)

 

In that example I exported from Unity but all the player script is lost becausse it was not 2017'upgraded.
So we have here just an object , and it was not necessary to use Unity to get that.

https://skfb.ly/6qQSu

 

vcard
vcard's picture
Updating very old unity scenes.

Hi Alain,

Yes updating scenes created with (very) old versions of unity is not straightforward. Terrain and objects are less problematic but scripts are a pain since things change frequently with versions and updating may demand a lot of work. 

Hint: try Unity's Automatic API Updater
https://docs.unity3d.com/Manual/APIUpdater.html

Hope it helps in some way. We need Alain's creativity on Unity wink

vcard 

vcard
vcard's picture
Flying avatars in Unity - Kit available for download

Hi all,

The Flying Kit for Unity is now available for download. More details, installation and download link in our blog post: 

A player Flying Kit for Unity

BabelXplayerFlyKit

Let us know about your creations and enjoy!

vcard

GTranslate