Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Visual Scripting Flying/Gliding Mech

Discussion in 'Visual Scripting' started by xronosmax, Jan 31, 2022.

  1. xronosmax

    xronosmax

    Joined:
    Dec 16, 2021
    Posts:
    2
    I am having trouble with using Visual scripting where I am adding a simple gliding mechanic. I so far got a movement control with coyote time and double jump with it but for some reason the glide mechanic is lost on me. All I really want it to do is whenever you jump or do a double jump is to turn down the gravity scale and let you slowly float down to the ground but for some reason I cant seem to understand where to begin on making that. If anyone could possibly help me with an idea of how to go about this, just an example would be enough for me to work with but as of now I have no idea how to implement the glide mechanic. I can build the code in c# but I cannot get it working in visual scripting. I would use c# but my jump does not function the way I intended it to anymore when I do it that way.
     
  2. Trindenberg

    Trindenberg

    Joined:
    Dec 3, 2017
    Posts:
    395
    When velocity -y, AddForce +y × antiGravityFactor
     
  3. xronosmax

    xronosmax

    Joined:
    Dec 16, 2021
    Posts:
    2
    Thank you sir it seems to work.
     
    Last edited: Jan 31, 2022