Bevy 0.12 Beginner Tutorial Series - Ep 2 - 3D Basics, Resources, and Organizing Code!

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 166

  • @ZymartuGames
    @ZymartuGames  Рік тому +14

    Next episode out now! ua-cam.com/video/f-Q8vOb5qRY/v-deo.html

    • @Christobanistan
      @Christobanistan 8 місяців тому

      No matter where I put it, assets doesn't copy to the output folder. Googling yields the need to use a build script, as of few years ago. Is there a better way?

  • @YerXRe
    @YerXRe 8 місяців тому +43

    25:00 If you are running 0.13 and noticing that your model does not load properly (aka its completely black), this is due to the extent of brightness of AmbientLight being lowered in 0.12->0.13
    To fix this: just increase brightness to something really high (300. for example).

    • @hahouari_dz
      @hahouari_dz 8 місяців тому

      I'm new into gaming dev overall, I must say, comments like yours are what gives me better hope in humanity overall, and in game dev community as well

    • @yanfoo
      @yanfoo 8 місяців тому +2

      Ah! Thank you! I knew I would find the answer reading the comments, instead of writing my own, asking for a solution. +1

    • @YPwnU97
      @YPwnU97 6 місяців тому

      Really appreciate it!

    • @erikringwalters
      @erikringwalters 3 місяці тому

      Thanks for the info! it seems that the brightness value that was 1.0 is now 1000, so if you want 0.75 like in the tutorial, enter 750 for the brightness.

    • @Whiterely
      @Whiterely Місяць тому

      Thanks,bro.

  • @theAdventurousCyclist
    @theAdventurousCyclist Рік тому +65

    I cannot thank you enough for getting into code organization and structure as early as possible. So many tutorials on whatever skip this part entirely (assuming EVERYBODY KNOWS) and so you never learn this and end up in messy code! Thank you, Sir!
    One of the best tech tutorials I have ever seen, with a great mixture of theory and well explained coding. Looking forward to part 3. If you ever land on Patreon and/or Steady, I will back you.

    • @ZymartuGames
      @ZymartuGames  Рік тому +5

      Great to hear! This is really nice feedback. Thank you!

    • @tekneinINC
      @tekneinINC 9 місяців тому +2

      I also 100% agree with this entirely.
      Starting organized is super helpful , especially with games.
      I had starting looking at bevy a couple days ago to start making my second ever game side project, and I think how to handle organization was the first thing I was getting a bit concerned about when looking at some of the examples. So learning about the bundles and plugins was _exactly_ what I needed!

    • @FlorianZier
      @FlorianZier 7 місяців тому

      +1 from me too. For newcomers it's a great help and even if you know it for your own projects, sometimes it's hard to see how to structure the code before you even know the whole picture. I had a study project a few years ago rendering with OpenGL, but most of the examples and tutorials just dumped it into one big file. Same with WebGPU and that is missing examples for parallel pipelines too, so after you are done with the tutorial you have to restructure something you didn't even know before, just to make it usable for future additions.
      I like the introduction to Bevy Plugins in such an early stage because it directly steers you in a direction without having to refactor all of the code after you are done with the basics.

  • @dobladov5055
    @dobladov5055 Рік тому +38

    By far the clearest tutorial of how to organize code using Bevy, very lucky to see it published minutes before finishing your previous video.
    I'm looking forward to seeing more of these series.

  • @Good_Praxis
    @Good_Praxis 9 місяців тому +23

    I don't know if you're tracking changes for the code, but I am following along on 0.13 and here's the one thing that changed:
    AmbientLight now needs to have a brightness of 750.0 instead of 0.75 for the same effect

    • @nickmills8476
      @nickmills8476 7 місяців тому

      this!

    • @michaelschneider729
      @michaelschneider729 7 місяців тому +1

      Thanks! Before I read your comment, I only thing I could see was a black shape above a really dark background. Is there any explanation, why they changed it? If brightness is considered something that can range from 0 to 100%, 0.75 would be much easier to understand than 750.0

    • @PeterFaria
      @PeterFaria 6 місяців тому

      Thank you! I was so lost before this

  • @georgeryan5742
    @georgeryan5742 11 місяців тому +17

    I've been coding since I was 7 years old. I'm currently 19 and this in all my years of life, even though I have not lived long is by far the best series of coding tutorials I have ever come upon. I can't believe you don't have more subscribers. You explain everything beautifully and dive deep into the workings behind everything rather than just telling us to type line after line of code. I sincerely hope you continue this series and continue to produce content. As your production quality is already amazing, as it gets better I'm sure your channel will grow. I'm going to recommend you to anyone who wants to learn Bevy.

    • @ZymartuGames
      @ZymartuGames  11 місяців тому +4

      Wow, that's a really meaningful piece of feedback for us to hear. Thank you so much!

    • @DreadKyller
      @DreadKyller 9 місяців тому +1

      Been coding since I was 8, I'm now 29. I can concur that this is up there, the pacing is slow enough to absorb but concise enough that it doesn't drag on forever. The visuals are simple but do their job well. Overall very well structured videos.

    • @harryunnaa
      @harryunnaa 7 місяців тому

      @@DreadKyller I've been coding since I was 5, I am now 62.

  • @antoinerussbach
    @antoinerussbach Рік тому +9

    I really appreciate the pace, not to long on each topic, but still very clear.

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Thank you! Glad to hear that the pacing wasn't too fast or too slow.

  • @tenthlegionstudios1343
    @tenthlegionstudios1343 Рік тому +10

    Thanks again for the content! Making sure to comment on each of these so they get more engagement. Best intro series so far hands down :)

  • @mikkelens
    @mikkelens Рік тому +7

    Very excited to see where this series goes.

  • @AdrianCretzu
    @AdrianCretzu Рік тому +9

    Excellent tutorials. I love that you explain in fundamentals & low-level concepts (ex: code organization, bundles, etc.) and then implement them in your code tutorial.
    Keep these coming!

    • @ZymartuGames
      @ZymartuGames  Рік тому +2

      Awesome, thank you! We want to ensure that everyone watching builds a deeper understanding, so they have the skills to write games beyond the specific code discussed in the video.

  • @mio_zak
    @mio_zak Рік тому +3

    Thank you for your awesome videos !
    I rarelly comment but here I had to. Like I've seen in other comments, it is super nice that you give us the theory and then the practice. It's the perfect balance so that we understand what we are coding instead of just copying you screen !
    Again thank you. Hope you're gonna keep up this series !

    • @ZymartuGames
      @ZymartuGames  Рік тому +1

      Thank you, hearing this type of feedback helps us stay motivated to make more videos! Thanks again.

  • @jeromebousquie3379
    @jeromebousquie3379 Рік тому +2

    Please keep on teaching us, it's excellent. I'm recoding every of your LOC while watching your videos. Awsome

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      Glad to hear it! Thanks for watching.

  • @agustindiaz3361
    @agustindiaz3361 Рік тому +11

    Nice! keep these great tutorials going!

  • @theaerohead
    @theaerohead Рік тому +2

    Thanks for the note at 23:15, it really helped me out! I ran into the issue while following along where my spaceship wasn't loading, and it turned out that even though my assets folder was in the root directory, my asset file was in a folder inside that folder and not in the assets folder directly.

  • @stames2319
    @stames2319 Рік тому +1

    I like, that you start simple and take the time to refactor code when it gets more complicated. I think that resembels way better a real workflow

  • @kiransingh2935
    @kiransingh2935 9 місяців тому +5

    Good tutorial, but for some reason the adding the ambient light resource makes the spaceship darker? Weird... Removing the resource makes it possible to see some details/color on the ship, but including that line makes it completely black.
    Edit-- apparently in bevy 0.13.0 the range of the brightness feature is from 0-> inf, setting 0.75 is basically zero to bevy. Instead, you can increase the luminosity by setting it to ~1000

  • @Galakyllz
    @Galakyllz 11 місяців тому +1

    This series is exceptional so far. I can't wait to watch the rest.

    • @ZymartuGames
      @ZymartuGames  11 місяців тому +1

      Thank you! I hope you enjoyed the rest of the series.

  • @flazefeeds381
    @flazefeeds381 Рік тому +4

    Excellent quality series. Keep up the great work.

  • @yournamehasbeentaken9752
    @yournamehasbeentaken9752 Рік тому +2

    Very good info. I'm new to Rust (and not exactly skilled at any programming language ) and chose Bevy as a way to learn Rust and jump into a growing ecosystem. I think this series is shaping up to be the best I've found so far. Even just the code separation, which I was just trying to figure out, was nice. Can't wait for more content.

    • @ZymartuGames
      @ZymartuGames  Рік тому

      That's great to hear. Glad it was helpful!

  • @антонполещук-р5ь

    Really nice tutorial. Bevy still doesn't have enough information on the Bevy book so it is really hard for newbies as I am to learn this engine basics. Keep doing this tutorial please, it is very helpful!

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Glad it was helpful! And absolutely, the official documentation only scratches the surface of what Bevy has to offer.

  • @archiesethtuo
    @archiesethtuo 9 місяців тому

    Thank you for all of this amazing work. Please don't stop working on this! Bevy is still a new and developing engine very much in the early stages of development, everything is changing rapidly (I've been watching its progress from the 0.4 days and the engine now (0.13) is pretty much unrecognizable from those times), and there's not much info around at all. Great tutorials like these are really hard to come by. Especially for me, who's a novice in graphics and game development. I'm actually trying to use Bevy for some genetics programming experiments (a 2D hunger games simulation), and it's been a total headscratcher for me to say the least. Your tutorials help tremendously!

  • @ArgoIo
    @ArgoIo Рік тому +5

    This tutorial is just amazing!

  • @redram4574
    @redram4574 Рік тому +21

    Note that you might not want to label the series with episode numbers. The UA-cam punishes episodic content a lot were every episode will get less and less views. There are some great videos on optimizing thumbnails and titles. I mean with your titles right now I can only see 1-2 words of the actual titles, the rest is just "series - episode X" :p

    • @ZymartuGames
      @ZymartuGames  Рік тому +3

      Good point! Will definitely try to shorten the amount of text in the titles. Appreciate the feedback!

  • @enigma743
    @enigma743 Рік тому +2

    Fantastic! Very straight forward, good pacing, and explanations are clear. Please keep it up!

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Thank you! Next episode is coming out very soon!

  • @l3f3v
    @l3f3v Рік тому +1

    I like this tutorial series a lot :)
    Happy to see such a small content creator with such high quality content.

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      Thank you! Appreciate the comment.

  • @yobenezneb2
    @yobenezneb2 Рік тому +5

    GEE OHM ETRY !!! Great series so far, with just a tiny criticism about tiny text... I'm old-ish and can no longer read good... Lovin' it!

    • @ZymartuGames
      @ZymartuGames  Рік тому +3

      Glad you are enjoying it! The font size will be bigger for episode 3!

  • @Parker8752
    @Parker8752 10 місяців тому +2

    So, lighting has changed significantly between 0.12 and 0.13 - to get the same effect, you're going to want to set the brightness to around 750.0 rather than 0.75.

  • @klirmio21
    @klirmio21 11 місяців тому +1

    Holy shit! Please, continue with this tutorial series! Your explanation are top-notch, it’s finally clicking for me!

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      Thank you! Glad it's clicking. I know it's a lot to wrap your head around at first.

  • @wraithstrikevids
    @wraithstrikevids Рік тому +2

    Great tutorials! Very easy to understand. Looking forward to the next one

  • @anarchoyeasty3908
    @anarchoyeasty3908 Рік тому +1

    eagerly looking forward to the third video. Great job on this series.

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Thank you. Next episode is coming very soon!

  • @Willkillson180
    @Willkillson180 Рік тому +1

    I really enjoy your voice and pace, good stuff man.

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Glad to hear it! Thanks for the feedback!

  • @RootsterAnon
    @RootsterAnon Рік тому +1

    Let's go, don't stop! just upload videos about Bevy 0.12.X. You are doing great!!

    • @ZymartuGames
      @ZymartuGames  11 місяців тому +1

      Thanks! If you made it through all the other episodes, we've finally gotten around to releasing episode 5.

  • @jackreacher963
    @jackreacher963 Рік тому +1

    Really great tutorial series so far.

  • @porky1118
    @porky1118 Рік тому +1

    7:00 I don't like when scale is a Vec3. It only allows scaling along three axes, but technically it's possible to scale along any axis.
    And most of the time, you want uniform scale anyway. If you don't scale uniformly, other problems might occur, which you usually don't want. For example sphere colliders can't be scaled non-uniformly.
    So I prefer a scalar to represent the scale.
    But I get why it's done. It's probably still the easiest way to represent non-uniform scalings, if you use rotation even along other axes.
    A special alternate transform for scaling along a specfiic axis still seems more useful to me. I never tired to implement it, though, so it might have drawbacks I didn't think of.

    • @porky1118
      @porky1118 Рік тому

      I wish I could use my own vector types without having to write my own renderer.

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      If you want to scale everything uniformly you can always use Vec3::splat(scalar).

  • @k0tigrun
    @k0tigrun 11 місяців тому +1

    Amazing tutorial. I'm a bit confused why adding light as resource adds it immediately into the scene? I would expect adding actual light sources into the "World" before they took any effect on the rendered image.

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      Resources are part of the ECS "World". For example, you can see how you can get a resource directly from the world in the ECS guide: github.com/bevyengine/bevy/blob/main/examples/ecs/ecs_guide.rs#L205.
      Does that make sense?

  • @fragajjia
    @fragajjia 10 місяців тому

    Favorite bevy tutorial so far. Subbed for more.

  • @kevdotbadger
    @kevdotbadger Рік тому +3

    Thank you for making these! ❤

  • @Eggshell1700
    @Eggshell1700 Рік тому

    3:57 Where would you put the code that defines the logic for the interaction between the Spaceship and the Asteroids? In one plugin or another? Or a separate plugin so that they do not depend on each other?

    • @ZymartuGames
      @ZymartuGames  Рік тому +1

      Most likely a separate plugin, but it depends on the behavior! You should see an example of this in the next video.

  • @JonasKernchen
    @JonasKernchen 8 місяців тому

    i love the theoretical explanation of how things work in your videos. but what i would like to know is where you learned all this yourself?

  • @cloudsquall88
    @cloudsquall88 Рік тому +1

    Incredible tutorials so far! Thank you so much!
    I have a question: in print_position, the autocomplete for transform.translation does not work. Does anyone know why this is the case? I mean writing up to transform and then putting a dot after, does not suggest translation, rotation or scale, which are the Transform's fields.

    • @ZymartuGames
      @ZymartuGames  Рік тому +1

      Great question! It's because of the info! macro. If you type it outside of the macro, on the line above, you should get the normal autocomplete! Macros can sometimes pose challenges for IDEs like VS Code in terms of providing accurate autocomplete suggestions.

    • @cloudsquall88
      @cloudsquall88 Рік тому

      @@ZymartuGames I'd have never thought about that, thanks!

  • @cthutu
    @cthutu Рік тому +1

    I know you're showing it as an example, but I would use run conditions to stop update_position from running if is_playing is false.

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Yep, agreed! Just didn't want to overload people by mentioning run conditions for this episode. We will cover them later on in the series.

    • @cthutu
      @cthutu Рік тому +1

      @@ZymartuGames Of course - totally agree. Just wanted to add it here for people who can take the overload :)
      The 2nd video is great! Just as slick as the first. Looking forward to more.

  • @flwi
    @flwi 4 місяці тому

    Holy smokes - you are a really talented tutor! Your series is _very_ easy to follow along and you already squashed some brain-bugs I had due to a lack of understanding (looking_at you, camera) ;-)

  • @dabada83
    @dabada83 Рік тому

    A gold mine to understand core concepts. Thanks!!!

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Glad it's helpful! Appreciate the feedback!

  • @ivanpriz4547
    @ivanpriz4547 Рік тому +1

    Hope to see more tutorials)

  • @striker3368
    @striker3368 Рік тому +1

    Really great tutorial and nice to see code management right from the start. The only things you should consider are to use a bigger font size for code (I did your tutorial on a laptop) and to slow down a bit in the live coding part. Also It would be nice if you could describe your visual studio code setup with used extensions.

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Thank you for the feedback, we will try to incorporate it into the next video. I can say for certain that the font size will be bigger for episode 3!
      As far as VS Code setup, everything is pretty standard. The setup shown in the video is using the rust-analyzer extension and Error Lens for highlighting and appending diagnostics directly in the editor. Let me know if you have any more questions!

  • @NeZversSounds
    @NeZversSounds 8 місяців тому

    Happy to report that it works with Bevy 0.13.2 so far. Except the very end with an AmbientLight. New default brightness is 80.0, but it still wasn't as bright as your spaceshit.
    Around brightness: 1000, it started to look similar brightness.

  • @theAdventurousCyclist
    @theAdventurousCyclist Рік тому +1

    I do not know how this works in game dev and/or rust and/or bevy, but could you please talk a little about tests, if it fits into your series? Unit, integration, and e2e tests and tdd?

    • @ZymartuGames
      @ZymartuGames  Рік тому +1

      Will keep that in mind! Thanks for the feedback!

  • @chickenfur
    @chickenfur Рік тому +1

    Loved it, this is great. I really appreciate this.

  • @SuperKornXG
    @SuperKornXG 10 місяців тому

    Thanks a lot for the learning resource 😁! The contents are well ordered and easy to follow, I love it.

  • @goshawk_fly
    @goshawk_fly Рік тому +1

    It's very useful! Thanx! I wait next lessons!

  • @zkeltonETH
    @zkeltonETH 11 місяців тому +1

    LMAO, I love your sense of humor. The ✨GeOmEtRy✨section had me rolling!

  • @jangrant5171
    @jangrant5171 10 місяців тому

    You're using x/z coordinates for the screen - the choice is arbitrary, but it seems slightly surprising. Is that down to the axis of the imported model?

  • @nati7728
    @nati7728 11 місяців тому +1

    Loving this series. I'm coming from Unity and keep returning to Bevy every now and then to see how it's progressing. One thing that turns me away from Bevy is that it still in development, and even basic API like add_systems seems to be in flux. I know making a series like this is a big commitment, so I was wondering if maybe you feel like Bevy has gotten to a point where the info in this video will remain relevant for a long time?

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      I'd say that the ECS API is fairly stable now. It basically hasn't changed at all in the most recent release. If I had to guess, I'd say that the topics covered in this series so far will change very little for Bevy 0.13 and onwards. Of course there could still be major changes, depending on what the development team feels is most beneficial pre-1.0.

  • @klirmio21
    @klirmio21 11 місяців тому

    Can you please tell me, what is your extension which highlights the exact line where the syntax error occurred?

    • @ZymartuGames
      @ZymartuGames  11 місяців тому +1

      You can add the 'Error Lens' VSCode extension for inline diagnostics. This is the extension used in the videos (along with Rust analyzer): marketplace.visualstudio.com/items?itemName=usernamehw.errorlens.

  • @Ariemeth
    @Ariemeth 10 місяців тому

    If you are trying to follow along but using Bevy 0.13.0, you will want to change the ambient light brightness to 750 to get the approximate same lighting..

  • @ANTIMONcom
    @ANTIMONcom Рік тому +1

    Thanks for another great video :)

  • @HosseinOjvar
    @HosseinOjvar Рік тому +1

    Thank you
    Such a good tutorial with a nice example ;)

  • @JohannesHansen1980
    @JohannesHansen1980 Рік тому +1

    Top notch tutorial. Keep em coming. :D

  • @Lei_P_C
    @Lei_P_C 7 місяців тому

    Thought we were checking different documents of bevy-render as they are different. And yes, you were checking bevy_render 0.11.3, not as the title suggested 0.12.

  • @gnomehost
    @gnomehost 4 місяці тому

    brilliant! very clever explanations, congrats

  • @noxyu3m
    @noxyu3m 8 місяців тому

    amazing man, please continue!

  • @colquin
    @colquin Рік тому +2

    Great content, thanks so much!

  • @slimjimfatbrat
    @slimjimfatbrat Рік тому +1

    Great stuff!

  • @techbytefrontier
    @techbytefrontier 10 місяців тому

    I'm having a very annoying problem eveytime i add a file, the rust-analyzer start checking and takes a lot of time and cpu processing..

  • @CodeThatVoid
    @CodeThatVoid Місяць тому

    Hm. At 0.14 and up there is no SceneBundle anymore :( it forces to use SceneRoot.

  • @TobyHede
    @TobyHede 11 місяців тому +1

    Fantastic tutorial, would be tutored again.

  • @CarlosVedovato
    @CarlosVedovato Рік тому +1

    Great series, thanks!

  • @berboko3081
    @berboko3081 4 місяці тому

    Awesome tutorial, thanks a lot dude :D

  • @HAL_NlNETH0USAND
    @HAL_NlNETH0USAND 7 місяців тому

    Is it a Bevy 0.13. issue? I don't see the model, just the background.

  • @user-rg7ux5hn5t
    @user-rg7ux5hn5t Рік тому

    I sill cant start with bevy, as I am not getting it, how the input should be handled, e.g. if I want to move a player towards a location, look up on a treasure box and open it using the F button. This simple mechanic seems to be extremely hard to implement in Bevy, in compare to other game engines.

  • @Reaper9225
    @Reaper9225 4 місяці тому

    Your vids are 🦆-ing awesome. Very easy to understand and helpful af.

  • @Yous0147
    @Yous0147 Рік тому +2

    Calling the model mesh *Ǧ̸̰E̵̪͊̎O̷̗̥̓M̴͔͆͝Ḛ̵͒͝Ṭ̷̈́R̷͓͖̈̇Y̷̟̑̅* makes you understand it's purpose way better

  • @89blumenkohl
    @89blumenkohl Рік тому +1

    good breakdown 👍

  • @delarcoz
    @delarcoz 9 місяців тому

    amazing tutorial!

  • @sunlightdev
    @sunlightdev Рік тому

    For me, Component in my derive macro has a rust-analyzer issue:
    ```
    proc macro `Component` not expanded: No proc-macros present for crate
    ```

    • @ZymartuGames
      @ZymartuGames  Рік тому +1

      Hmm, that suggests that Rust Analyzer is having trouble recognizing or expanding the procedural macro Component. Does your code compile?
      Start by updating Rust Analyzer to the latest version, as well as updating your Rust toolchain. Bevy relies on the latest stable release of Rust.

    • @sunlightdev
      @sunlightdev Рік тому +1

      The Rust book had some changes for vscode settings.json for rust-analyzer.
      After I removed it the error disappeared.

    • @ArgoIo
      @ArgoIo Рік тому +1

      @@sunlightdev This isn't specific to Bevy either. If restarting the rust-analyzer isn't enough, try cleaning the project using "cargo clean". Be ready to take a coffee break for compiling though, as this purges the entire cache.

  • @flubba86
    @flubba86 Рік тому +1

    If I was designing this library, I would've called plugins "Blueprints", thats what a similar thing is called in Web Server libraries like Flask.

  • @arturnowicki6598
    @arturnowicki6598 Рік тому +1

    Oh no! Y is upward axis? :( I'm so used to Z

  • @iridelombardi
    @iridelombardi Рік тому +3

    16:38 jumpscare

  • @EloyLima1971
    @EloyLima1971 Рік тому

    Very nice, again! Thank you.

  • @fatoldyeti1208
    @fatoldyeti1208 10 місяців тому

    The content is good. The problem is Bevy breaks so much every 3 months. The Ambient Lighting on your example works in 12 and below but fails to light in v13

    • @fatoldyeti1208
      @fatoldyeti1208 10 місяців тому +1

      Ok, just to reply to myself as I debugged it, v0.13 made a change where the brightness of AmbientLight is a lot lower than it was relatively. Set to 750.0 looks really good.

  • @hearteyedgirl
    @hearteyedgirl 4 місяці тому

    in bevy 0.14.1 Color::rgb(red: u8, green: u8, blue: u8) -> Color is deprecated, use Color::srgb(red: f32, green: f32, blue: f32) -> Color instead

  • @gregoryfenn1462
    @gregoryfenn1462 11 місяців тому

    Hi all :) very stuck on this one :( my game world is grey and my human is moving slowing up the x axis as expected (0,0,0) moving slowly to (1,0,0), but I can't see it. Below is the code used to make the human and camera:
    pub fn spawn_human(mut commands: Commands, assets: Res) {
    let init_vel = Vec3 { x: 0.2, y: 0.0, z: 0.0 };
    let init_model = SceneBundle {
    scene: assets.load("bartender_human.glb#Scene0"),
    ..default()
    };
    let init_human = Human {
    velocity: init_vel,
    spacial_bundle: SpatialBundle::default(),
    model: init_model,
    };
    commands.spawn(init_human);
    info!("Human created");
    }
    pub fn add_main_camera(mut commands: Commands) {
    let main_cam = Camera3dBundle {
    transform: Transform::from_xyz(0.0, -8.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y), /* Where???? */
    ..default()
    };
    commands.spawn(main_cam);
    info!("camera created");
    }
    and I have confirmed both functions are called on startup as expected correctly due to the info! macro call to prove it.
    The camera itself can go in basically one of 4 places I think? which one is correct of the following:
    transform: Transform::from_xyz(0.0, -88.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y), /* Where???? */
    transform: Transform::from_xyz(0.0, 88.0, 0.0).looking_at(Vec3::ZERO, Vec3::Y), /* Where???? */
    transform: Transform::from_xyz(0.0, -88.0, 0.0).looking_at(Vec3::ZERO, Vec3::Z), /* Where???? */
    transform: Transform::from_xyz(0.0, 88.0, 0.0).looking_at(Vec3::ZERO, Vec3::Z), /* Where???? */
    My light settings are as follows:
    fn main() {
    App::new()
    .insert_resource(ClearColor(Color::rgb(0.5, 0.5, 0.5)))
    .insert_resource(AmbientLight { brightness: 0.75, color: Color::WHITE })
    .add_plugins((DefaultPlugins, GameStatePlugin, MyStartupPlugin, MyFrameStepPlugin))
    .run();
    }
    Which gives a light grey background and should give some ambient light as in the video right?
    The human I need to render is : poly.pizza/m/DgOCW9ZCRJ which I have in the project as "assets/bartender_human.glb" (rust isn't giving any warnings about not being able to load this resource).
    Any tips on what I'm doing wrong?

  • @Aditya-nc7hq
    @Aditya-nc7hq Рік тому +1

    👍

  • @Xvist
    @Xvist Рік тому

    This is so nice. Sub and thumbs up!

    • @ZymartuGames
      @ZymartuGames  Рік тому

      Thank you! Glad to have another person following along!

  • @谢朋刚
    @谢朋刚 9 місяців тому

    0.75 brightness is so dark. i try 200.0

  • @backstabba
    @backstabba 11 місяців тому +1

    Good job, but must point out that you are writing really fast and also talking at the same time. I must slow to 0.5 to absorb information, sometimes even 0.25

    • @ZymartuGames
      @ZymartuGames  11 місяців тому

      Thanks for the feedback! We will try to be more aware of the overly fast pacing for future videos.

  • @TheBacken4
    @TheBacken4 10 місяців тому

    GEOMETRY

  • @Christobanistan
    @Christobanistan 8 місяців тому

    Moves so fast (and text so small) that I can't read WTF you're doing.

  • @bibliusz777
    @bibliusz777 Рік тому

    Too many topics for 1 video

  • @rosecash2008
    @rosecash2008 Рік тому

    😀 "PromoSM"

  • @alvaroefmota
    @alvaroefmota 11 місяців тому +1

    Amazing, Thank you for this tutorial.