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

How to fix Bevy ECS queries conflicting even with filters

I am trying to execute the below two queries in a bevy system function. fn move_player( mut player_query: Query<(&mut Velocity, &mut Transform, &SpriteSize, &Player), With>, wall_query: Query<(&Transform, &SpriteSize),…
simplelenz
  • 877
  • 1
  • 9
  • 22
2
votes
1 answer

how to zoom in to a sprite in bevy

I wanted to implement zooming in my 2d bevy game. After some code browsing I found out that Camera2dBundle uses OrthographicProjection by default and can not zoom in as required. I tried using Camera3dBundle which does define projection:…
Abb4
  • 48
  • 4
2
votes
1 answer

Bevy / Winit - Open GUI Without Focus

I'm writing various graphical tests in Bevy. Each spawns the GUI, runs for a few seconds, and then exits the app and moves on to the next. I love being able to visually check its doing what I think, but when each starts it steals focus from VS Code.…
chantey
  • 4,252
  • 1
  • 35
  • 40
2
votes
2 answers

Change state from outside Bevy system

i have already have a bevy app that run in the browser. what i want to do is having some function in the js/ts side that can create or destory a entity in the bevy world, can this be possible? I have try to let app=App::new();, then bind a function…
2
votes
1 answer

iter_mut() doesn't run whenever I try to add status in Bevy 0.8.1

I added collision between the player and the ground, and I want to add a jumping mechanic into my game with on_ground. However, whenever I try to add status, it just stops iterating entirely. fn collision_detection( ground: Query<&Transform,…
Kuumin
  • 23
  • 1
  • 6
2
votes
2 answers

How to bind non-UI entity with UI entity in Bevy

Description I'm trying to implement trigger logic when the player faced the trigger I should remove the UI element from the screen. Spawning the trigger point /// Create a trigger point and when the user faced with /// it I'll mark the tutorial as…
MadMed677
  • 63
  • 3
2
votes
1 answer

How to use geometry-instancing in Bevy?

I am rendering a point-cloud using Bevy, but currently spawning a icoshpere for each point, which gets quite slow with 775k points. What is the easiest way to use mesh instancing to reduce overhead? This is the code for how I am doing it…
Redline
  • 441
  • 8
  • 20
2
votes
1 answer

Cargo claims that rustc has not json flag

Hi I am trying to learn the basics of rust and one of the packages(ron) that comes as dependency for bevy is throwing an error. When I run cargo build I see: Compiling ron v0.7.0 Compiling bevy_diagnostic v0.6.0 Compiling bevy_gilrs…
sgp667
  • 1,797
  • 2
  • 20
  • 38
2
votes
1 answer

How to move camera arbitrary of user input in Bevy

I've used Camera2dBundle to import sprites and backgrounds into the scene I'm setting up. But I'm not sure how to move the camera independently of the sprite movements. Basically I don't want the camera to follow the player. I want it to constantly…
chiffre
  • 29
  • 1
  • 3
2
votes
1 answer

How to read mouse motion in bevy?

I want to create a first person camera. I already researched the source code of several other implementations like https://github.com/mcpar-land/bevy_fly_camera https://github.com/sburris0/bevy_flycam But when implementing it by my own(mostly copy…
Bruno Wallner
  • 383
  • 5
  • 13
2
votes
1 answer

How to load part of image in bevy engine

I have a sprite sheet png file that contains some static sprites like walls or grass. How can I split them into individual sprites by their coordinate in the image?
starcy
  • 31
  • 1
  • 3
2
votes
0 answers

How to add event to system set in bevy

i want to add event like this: pub fn add_system_set_event(&mut self) -> &mut Self where T: Component, { self.insert_resource(Events::::default()) .add_system_set_to_stage(CoreStage::First, SystemSet::new() …
saberuster
  • 21
  • 2
2
votes
0 answers

If I add a system that emits events to a stage following the `EVENT` stage, will that delay the reading of those events?

I have a system (let's call it game_event) that consumes input events from various sources (keyboard, gamepad, etc) and maps them to game-specific events (move, jump, etc). My understanding is that if I add my game_event system to the EVENT stage,…
w.brian
  • 16,296
  • 14
  • 69
  • 118
2
votes
1 answer

Is there a way to get access to the camera buffer in Bevy?

I would like to get access to the camera buffer and pipe and that out to a machine learning application, but am having trouble figuring it out. Apparently camera_node.rs and particularly camera_node_system contain the buffer, but how would I get…
2
votes
1 answer

Is there a Bevy equivalent for Amethyst's fixed_update?

In Amethyst, or numerous other game engines, there is a distinction between update for the logic and fixed_update for the rendering. Bevy 0.4 introduced states, but there are only enter, update and exit lifecycle hooks. A custom stage can be made…
DSR
  • 62
  • 5