Sunday, August 21, 2022
HomeGame Developmentunity - Imitate simplified bird-flight conduct

unity – Imitate simplified bird-flight conduct


I’m creating a first-person participant motion wherein the participant ought to “fly” within the path of his native ahead vector.

That is working completely tremendous, nevertheless, once I flip the participant to face different path (rotate the y rotation axis), the pressure that has been added until this level, retains considerably affecting the rigidbody so it strikes the article in the direction of the flawed path, and it takes quite a lot of résistance pressure to maneuver in the direction of the “new” path I’m dealing with.

I would optimally like to have a little bit of “drifting” have an effect on, so it maintains a practical contact.
I am making an attempt to attain a conduct that’s just about similar to a automobile conduct, so when the article is popping in the direction of a path, the article will truly nearly immediately transfer in the direction of this path, sustaining its present velocity.

To make it clearer, here is an illustration of the present conduct:
current behavior

This is an illustration of the specified conduct:
desired behavior

That is the present code I am utilizing:

        //Add pressure up 
    playerRB.AddForce(Vector3.up *  wingForceUpMultiplier * forceUserInput, ForceMode.VelocityChange);
       //Add pressure ahead 
    playerRB.AddForce(forwardDirection * wingForceForwardMultiplier * forceUserInput, ForceMode.VelocityChange);

I’m not essentially searching for a complex-physics answer, it may be a easy workaround if there may be any.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments