A downloadable game

Download NowName your own price

Asset required: Invector Shooter Controller 2.6.2a. Use Invector@FlyTest animator controller.

For animations, just replace your own fly animations inside Base Layer Locomotion.

Will still improve this action by adding more features.

Set up: 

In this package FlyAction_v0.1.unitypackage, I used  a paid animations from asset store: https://assetstore.unity.com/packages/3d/animations/dynamic-flight-animations-pa...


FlyAction_v0.2.unitypackage - fixed strafing issue when flying

StatusReleased
Rating
Rated 5.0 out of 5 stars
(2 total ratings)
Authorhobbycoder

Download

Download NowName your own price

Click download now to get access to the following files:

flyaction.unitypackage 1.3 MB
FlyAction_v0.1.unitypackage 1.3 MB
FlyAction_v0.2.unitypackage 1.3 MB

Comments

Log in with itch.io to leave a comment.

awesome asset but mine is throwing this error

           {

                    Debug.Log("Player Flying UP");

                }

                ///Set Velocity do Move UP

                flyDownInterpolate = 0f;

                flyUpInterpolate += Time.deltaTime * flyUpDownSmooth;

                flyUpInterpolate = Mathf.Clamp(flyUpInterpolate, 0f, 1f);

                var vel = tpInput.cc._rigidbody.velocity;

                vel.y = Mathf.Lerp(vel.y, flyUpSpeed, updownSmoothCurve.Evaluate(flyUpInterpolate));

                tpInput.cc._rigidbody.velocity = vel;

                ///Set input Y to force character movement;

                tpInput.cc.input.y = 1f;

                ///Change Action State to fly Down

                tpInput.cc.animator.SetInteger(vAnimatorParameters.ActionState, 4);

            }

            else if (flyDownInput.GetButton())//Conditions to Move Down        

            {

                if (debugMode)

                {

                    Debug.Log("Player Flying Down");

                }

                flyUpInterpolate = 0f;

                flyDownInterpolate += Time.deltaTime * flyUpDownSmooth;

                flyDownInterpolate = Mathf.Clamp(flyDownInterpolate, 0f, 1f);

                var vel = tpInput.cc._rigidbody.velocity;

                vel.y = Mathf.Lerp(vel.y, flyDownSpeed, updownSmoothCurve.Evaluate(flyDownInterpolate));

                tpInput.cc._rigidbody.velocity = vel;

                ///Set input Y to force charter movement;

                tpInput.cc.input.y = -1f;

                ///Change Action State to fly Down

                tpInput.cc.animator.SetInteger(vAnimatorParameters.ActionState, 3);

            }

            else

            {

                ///Reset Input Y and Character Vel Y;

                tpInput.cc.input.y = 0f;

                flyDownInterpolate = 0f;

                flyUpInterpolate = 0f;

                var vel = tpInput.cc._rigidbody.velocity;

                vel.y = Mathf.Lerp(vel.y, 0f, flyUpDownSmooth * Time.deltaTime);

                tpInput.cc._rigidbody.velocity = vel;

                if (isFlyingSprintState)

                {

                    if (debugMode)

                    {

                        Debug.Log("Player Flying Sprint1");

                    }

                    tpInput.cc.animator.SetInteger(vAnimatorParameters.ActionState, 2);

                    tpInput.cc.moveSpeed = flySprintForwardSpeed;

                   

                }

                else

                {

                    tpInput.cc.moveSpeed = flyForwardSpeed;

                    tpInput.cc.animator.SetInteger(vAnimatorParameters.ActionState, 1);

                    

Hey there HC.  Purchased the Animations and imported them prior to importing your package.  But none of  the animations are assigned in the animation controller .