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
5
votes
1 answer

Bevy Vertex Colored Shader

I'm a newbie to shaders, and I'm trying to build a vertex colored shader in Bevy. Fortunately one of the bevy examples goes through how to use a custom shader, and creates a vertex colored shader, but unfortunately it doesn't show lighting anymore!…
Joe Fioti
  • 421
  • 4
  • 15
5
votes
1 answer

Is there a way to create "render texture" in Bevy?

I'd like to create a portal-like effect using Bevy. It seems Unity has a render texture to achieve that. Is there a way to do the equivalent in Bevy? If not, is there a plan to support that in the future?
whale9490
  • 67
  • 5
5
votes
2 answers

Bevy rotation in 2D

I'm trying to use Bevy 0.3, and I'm able to use the built-in transforms easily with Camera2dComponents::default(). This is top-down 2D. The issue is trying to synchronise the player's rotation to the mouse: for event in…
Ulrar
  • 895
  • 8
  • 17
4
votes
2 answers

Why are Bevy's Trait bounds not satisfied for the Rapier physics plugin?

I've been trying to run this minimal example to get Rapier's physics working with Bevy: use bevy::prelude::*; use bevy_rapier2d::prelude::*; fn main() { App::new() .add_plugins(DefaultPlugins) …
TechPerson
  • 320
  • 1
  • 8
4
votes
1 answer

Rust (Bevy): ECS Network data structure

I am not quite sure if I completely understand the Entity Component System approach, and probably that is one of the reasons for the emergence of this question. Still struggling with the OOP mindset! I am trying to create a data structure similar to…
4
votes
1 answer

Get width and height from an image in Bevy

I am fairly new to Bevy and rust. I want to load an png image and get the width and height of it. The code below does not print "found resource ...". fn setup( mut commands: Commands, asset_server: Res, mut materials:…
Michael
  • 892
  • 2
  • 10
  • 28
4
votes
1 answer

Fastest way to deal with many sprites in bevy-engine

I am building a Cellular Automata visualization "game" with Rust and the BevyEngine. Currently, when initializing the world, I spawn a sprite for every cell. Within each update the sprites color is changed according to wether it is alive or…
Voß
  • 103
  • 9
4
votes
0 answers

Render Blender / gltf model including colors using Bevy

I'm doing my first steps with Bevy aiming for "settlers" or "anno 18xx" kind of simulation. I have a tree model, that I exported from Blender as gltf. The tree has a brown trunk and green leaves. I could open the gltf file in a web based viewer and…
Achim
  • 15,415
  • 15
  • 80
  • 144
4
votes
1 answer

Proper way to keep assets loaded in Bevy engine using Handle and using the assets later?

I am learning Rust and Bevy engine, and I want to keep certain assets (such as Fonts) loaded during the entire application life-time. // Resource for fonts: #[derive(Default, Clone)] pub struct ResFont { pub ui: Handle, // The font that…
NameOfLord
  • 41
  • 2
4
votes
1 answer

Get all components of entity

Is it possible to get a list of components by having Entity in bevy rust? For example for debugging purposes. use bevy::prelude::*; fn main() { App::build() .add_plugins(DefaultPlugins) .add_startup_system(setup.system()) …
simens_green
  • 73
  • 1
  • 5
4
votes
1 answer

Dll lookup fails on application load time

I'm trying to follow bevy's tutorial and setup everything on Windows 10 (21H1) x64. The setup kinda works. I did the following build optimizations (from bevy's tutorial): bevy's dynamic link feature switch to the LLD linker switch to latest rust…
Timo
  • 9,269
  • 2
  • 28
  • 58
4
votes
1 answer

How to add a background image to 2d game in Bevy

How can I add a background image to my 2d game? The code is here: https://github.com/mthelm85/game In assets/textures I have a file called pitch.png that I would like to serve as the background for my window. I can't find any info on how to do…
mthelm85
  • 121
  • 3
  • 10
4
votes
2 answers

How to rotate and move object in bevy

I want to rotate my object by a given amount and translate it forward to create a steerable tank. I couldn't find out how to do it, all the matrices, vectors, and quaternions make it difficult for me to find a solution. This is the Unity equivalent…
Redline
  • 441
  • 8
  • 20
4
votes
2 answers

What is an acceptable approach to dragging sprites with Bevy 0.4?

While trying out Bevy, I had the need for dragging and dropping sprites. Unfortunately, this does not seem to come ready made or I did not find it in the documentation. What would be the most idiomatic way to achieve this goal? What I have tried so…
MKroehnert
  • 3,637
  • 2
  • 34
  • 43
4
votes
1 answer

Higher ranked trait bounds and function parameters

I'm trying to understand the implementation of Bevy's IntoForEachSystem trait and the way it interacts with the underlying Hecs Query and Fetch traits. Hecs has query types (the thing you request in a call to query::) and item types (the thing…
Tim Robinson
  • 53,480
  • 10
  • 121
  • 138
1
2
3
10 11