Questions tagged [bevy]

A cross-platform, massively parallel game engine with an entity component system and 2D and 3D renderers.

Read more at the official website.

161 questions
2
votes
2 answers

In BevyEngine, which direction is up?

It isn't clear which coordinate system the engine uses. I've tried looking through the documentation and the book.
2
votes
0 answers

How do I add a parent entity to a scene in Bevy?

I'm trying to attach a ComponentFoo to a whole scene coming from a gltf file. From what I understand I need to put the scene entities under a parent entity possessing that ComponentFoo. commands …
Simon
  • 860
  • 7
  • 23
2
votes
2 answers

How to explicitly describe the Z-order of UI elements with absolute positioning in bevy?

I have the following situation: A parent Node, taking all the screen space. A child for the top bar. A child for the game area. A child for the bottom bar. An absolute positioned child for an overlay that must not be bound to the three above. I…
Cuervo
  • 31
  • 2
2
votes
1 answer

How can I iterate on a Bevy Query and keep a reference to the iterated value so that I can use it later?

I have a borrow in the empty variable and I want to extend its life. In the commented code-block, I attempt to address it, but the reference is no longer available. I have to loop through the loop again to find the match in order to act on it. How…
VCD_WL
  • 30
  • 11
2
votes
1 answer

Does TextureAtlas sprite indices reflect the order in which they were added?

I'm using TextureAtlasBuilder to produce a TextureAtlas. I'm adding multiple textures to the atlas using the add_texture method. I'm then using that texture atlas as part of a sprite entity created from a SpriteSheetComponents bundle. When changing…
w.brian
  • 16,296
  • 14
  • 69
  • 118
2
votes
1 answer

Why does Bevy have trouble drawing my many SpriteComponents?

The following program is a very minimalistic example of a large quantity of SpriteComponents. In this example, with an FPS counter, you can see how costly SpriteComponents seem to be. I did notice that if I reuse the material handle, it does speed…
STF_ZBR
  • 617
  • 1
  • 4
  • 19
2
votes
1 answer

My empty rust project wont compile, what should I do?

I attempted to update my bevy dependency yesterday and everything came to a halt. I changed from version "0.1.2" to version "0.1.3." When I did this, my project stopped compiling completely. I changed the dependency back to "0.1.2" and it didn't fix…
STF_ZBR
  • 617
  • 1
  • 4
  • 19
1
vote
2 answers

Select entity by mouse clicking with bevy & rapier

So, I'm using Bevy (0.11) the Rapier (0.22) physics engine to have a bunch of blocks falling on each other, here is how I spawn the blocks: commands.spawn(( Collider::cuboid(dim, dim), MaterialMesh2dBundle { mesh: meshes.…
CpILL
  • 6,169
  • 5
  • 38
  • 37
1
vote
1 answer

How can I move a window in bevy?

I am new to rust and bevy and I wanted to follow the ball game tutorial: https://github.com/frederickjjoubert/bevy-ball-game/blob/Episode-2/src/main.rs, but when I wanted to spawn the ball it was spawned off-screen. This is the code I used(I've made…
robi503
  • 11
  • 1
1
vote
1 answer

Bevy version 0.10.0: How to fix 'WindowDescriptor not found in this scope' error?

Problems with Bevy version 0.10.0 WindowDescriptor struct I saw this tutorial:Bevy Game Engine Tutorial - Window and First Sprite (Ep1 and I tried to do the same thing, but my Bevy is in version 0.10.0, and this structure WindowDescriptor is not…
GabOnezio
  • 11
  • 2
1
vote
1 answer

How to do polygon collisions in Bevy with Tiled editor and Rapier?

I'm very new to game dev and to Rust, so I might be way on the wrong track. I'm using bevy 0.10.1, bevy_ecs_tilemap, bevy_rapier2d, and tiled to make a tilemap with collisions specified in the .tsx file. Some of my tiles use polygons to define the…
Eva
  • 4,397
  • 5
  • 43
  • 65
1
vote
1 answer

What is the correct way to implement NearestNeighbor for TextureAtlas sprites in a Bevy project?

I am trying to set up a bevy project and use pixelart.   Right now, it uses a textureatlas to load sprites from a single image. All is working, but I cannot find out how to use NearestNeighbor in my sprites. My sprites are blurry at the moment. All…
1
vote
2 answers

bevy_ecs_tilemap unable to load tiled .tsx files

Background I am working on a 2D game with Bevy. I want to use tilesets with tiled. I have found the crate bevy_ecs_tilemap and I looks promising for an easy solution. I have a file structure like this and want to load world.tmx tilesets ├──…
Jove
  • 105
  • 4
1
vote
0 answers

Apply Custom Materials to GLTF Scenes in Bevy

Hi I've made 3D game using Bevy framework. I uploaded gltf file using asset_server.load() and got scene with SceneBundle like this : fn spawn_gltf( mut commands: Commands, ass: Res, ) { let my_gltf =…
Youdi
  • 36
  • 5
1
vote
1 answer

Error building alsa-sys and libudev-sys for Bevy

I am trying to get started with bevy, I have set up the environment as suggested by the bevy book including using the nightly tool chain. However, when I try to build bevy I get the messages: error: failed to run custom build command for `alsa-sys…
Pioneer_11
  • 670
  • 4
  • 19