How to make a 3D Flying Controller in Unity

Поделиться
HTML-код
  • Опубликовано: 16 окт 2024

Комментарии • 43

  • @MadMarcWinnipeg
    @MadMarcWinnipeg 2 года назад +1

    Hell yeah. That was perfect to get me started.
    Thanx
    Marc :)

  • @christopheremerson2848
    @christopheremerson2848 Год назад

    Excellent script. Very straight forward and customizable control scheme. Thank you.

    • @EmilioBlacksmith
      @EmilioBlacksmith  Год назад

      And it can be updated with the new input system, thanks for watching the vid, and your comment!

  • @G33kFr33k
    @G33kFr33k 2 года назад +2

    The only thing I would change is that you do not need to multiply values for yaw, pitch, and roll with their power and Time.deltaTime twice. You did it initially when determining activePitch, activeYaw, and activeRoll. You did not need to do it during the transform.Rotate().

    • @EmilioBlacksmith
      @EmilioBlacksmith  2 года назад +1

      Oh lord, you're right, thanks for the feedback, my man

    • @jigarpanchal0
      @jigarpanchal0 Год назад

      @@EmilioBlacksmith 0:16 how did you make the spacehip bro specifically the lighting it emits how did you make that I did actually downloaded free asset from itch io but the thrust light and some other lights are not showing and I don't even know how to add them

  • @jigarpanchal0
    @jigarpanchal0 Год назад +1

    0:16 how did you make the spacehip bro specifically the lighting it emits how did you make that I did actually downloaded free asset from itch io but the thrust light and some other lights are not showing and I don't even know how to add them

    • @EmilioBlacksmith
      @EmilioBlacksmith  Год назад +1

      Sorry for the late response!
      For the emission of my spaceship I added a post processing volume to the scene with bloom effect and added emission to the material of the lights of the spaceship, check this video out, it's what I did to give the glowing of the spaceship: ruclips.net/video/2PBgCl-zIZQ/видео.html

  • @sophiayuna
    @sophiayuna 2 года назад

    This was a great video thanks for sharing

  • @fricknfrackgames6558
    @fricknfrackgames6558 2 года назад +1

    Nice! Well done!

  • @McDonaldsSprite247
    @McDonaldsSprite247 Год назад +2

    thank you

  • @jawaherhalsefri7433
    @jawaherhalsefri7433 2 года назад

    Thank you so much great video 💛💛

  • @sivasree9897
    @sivasree9897 2 года назад

    I have a problem
    Assets/SpaceshipMovement.cs(8,23): error CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 4.0 language specification
    please help me

  • @magikarpsushi1973
    @magikarpsushi1973 3 года назад +3

    Pretty useful... do you think this good be manipulated for use on a hot air balloon? - obviously a balloon as rather different flight mechanics
    Any chance you'd be whiling to assist with something like this?

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад +1

      Hey mate, it is an interesting request, you could use my flight system and change its core, and use, for example, the hot air balloon uses burners to increase or decrease the height, and it could work like the throttle lever of the airplanes. The Only thing I think it would change a lot is that we need to use rigidbody to simulate the physics of the hot air balloon, and the falling, changing of course some of the values of the balloon.
      And in the case of the yaw and roll, we don't have those in this case, we can use de horizontal and vertical values to move in the x and z axis of the balloon. I don't think there's an easy way to explain this changes, so if you want to I could make the tutorial on how to make an Hot Air Balloon, and as soon as I have the code for it, I'll send it to you, so you will not wait that much for yours to work.
      Hope this big comment was useful for you, and I'll make a video about it soon, maybe in two weeks, hopefully

    • @G33kFr33k
      @G33kFr33k 2 года назад

      Emilio is correct.
      Also, when using a rigidbody, you can adjust the drag coefficient to reduce the effect of gravity as well as the mass. When applying force to the rigidbody of the balloon you would only need to do so in one direction, and would want to use impulse.
      rigidbody.AddForce(Vector3.up * thrustAmount, ForceMode.Impulse);
      You lower the balloon by releasing stored hot air through a flap in the balloon, which could also be simulated through the same method.
      rigidbody.AddForce(Vector3.down * releaseRate, ForceMode.VelocityChange);

  • @Hyphen3372
    @Hyphen3372 2 года назад +1

    hey can you help for some reason when ever i turn 180 degreese on the z axis then my pitch isnt inverted.

    • @EmilioBlacksmith
      @EmilioBlacksmith  2 года назад

      Sure, are you using the same code from the video?

  • @Jaysiah360
    @Jaysiah360 2 года назад

    great vid but i have a problem with my plane when it moves, it moves in lets say frames like instead of smooth it just skipps to an angle

  • @jodyclemons4235
    @jodyclemons4235 Год назад

    I am getting an Error CS0117 : Space' does not contain a definition for self

  • @DavidAdochiti
    @DavidAdochiti 3 года назад +1

    how can i make it so that once u press space, u go on forever and then when u press space again u stop? Thanks! :D

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад +1

      Hey mate, I just made a new version just for you, using the spacebar as the throttle lever, in summary, you should make another boolean variable that will change according on the pressing or if you press again, this is the link for the code, to make it easier to you, hope this was helpful: github.com/OcelotDevelop/SpaceshipController/commit/139ddd820388f5f5c88edec71f2c806f947e1cc7

    • @DavidAdochiti
      @DavidAdochiti 3 года назад

      @@EmilioBlacksmith thanks a lot! u have no idea how much this means to me :D

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад +1

      @@DavidAdochiti it is a pleasure for me to be helpful

  • @pro_idott9328
    @pro_idott9328 3 года назад

    I have a problem when I use the code I dont have control of the plane at all only thing I have control of is the throttle

    • @pro_idott9328
      @pro_idott9328 3 года назад

      specifically I mean unity is saying there's a error with my input even though I set it up just like yours

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад

      @@pro_idott9328 Could you send here the error displayed on the editor console?

  • @jodyclemons4235
    @jodyclemons4235 Год назад

    now my ship keeps spinning when I press a button
    HELP Please ...Thank you

  • @sahilpalandurka7251
    @sahilpalandurka7251 3 года назад

    Can u go for touch controls

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад +1

      Sure, I'll made a video on touch controls, and will ping you once it's available, meanwhile you could use brackey's tutorial on it: ruclips.net/video/bp2PiFC9sSs/видео.html

  • @bernardmacdonagh9517
    @bernardmacdonagh9517 2 года назад

    to you have one on Helicopter?

    • @EmilioBlacksmith
      @EmilioBlacksmith  2 года назад

      I’m sorry, not yet, I’ve been focusing on making my big game instead of making more tutorials

  • @HX-uq2gr
    @HX-uq2gr 3 года назад +1

    There is only ohne Problem the plane is not tuning when rolling like it normally would.

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад

      would you want to contact me by email, to see your project and try to help you?

    • @HX-uq2gr
      @HX-uq2gr 3 года назад

      @@EmilioBlacksmith That’s so nice of you what’s your address?

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад

      @@HX-uq2gr OcelotDev@outlook.com

  • @bfk9636
    @bfk9636 2 года назад

    Could you make a video about plane's take-off and land,it will be much interesting to learn it😀

    • @EmilioBlacksmith
      @EmilioBlacksmith  2 года назад

      Maybe one day, right now I’m more focus on making my first videogame an isometric videogame named frostbite

  • @Ledieuchat
    @Ledieuchat 3 года назад +1

    were is a code ?? send link bro

    • @EmilioBlacksmith
      @EmilioBlacksmith  3 года назад

      github.com/OcelotDevelop/SpaceshipController/blob/main/FlyingMovement/Assets/Completed/Scripts/SpaceshipController.cs here you have it, mate

  • @ghostriderxzx
    @ghostriderxzx 3 года назад +1

    Rico

  • @jodyclemons4235
    @jodyclemons4235 Год назад

    ok I got it fixed

  • @jodyclemons4235
    @jodyclemons4235 Год назад

    HELP !!!