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

resizing windows in bevy

i am creating a game in rust using bevy 0.10.1. I have tried to manually set the window to fit the screen. However, if i am distrubuting this game, i can't set the sizes for all screens. Also, when I try to fullscreen the normal small window, the…
Shawn
  • 1
0
votes
0 answers

How to center and zoom camera in bevy?

I'm working with gis data and bevy with the following code fn building_meshes( mut commands: Commands, asset_server: Res, mut assets_meshes: ResMut>, mut materials: ResMut>, …
0
votes
1 answer

Bevy coordinates/translation relative to window size

I'm creating a 2d loadscreen for my game. I have a 512x512 logo image that I want to put in the bottom right corner of the screen, but I can't for the life of me figure out what the relation between window size and the coordinate plane is. 0,0 is…
salmon
  • 31
  • 4
0
votes
0 answers

2d sofy body collision resolvation fails to resovle collision. Rust, bevy

The system works great and manages to resolve all types of collisions except for when when a non static object slides of the corner of a static object. When that happens the object just fall through the static floor and intertwines itself. In these…
Viktor
  • 1
  • 1
  • 1
0
votes
1 answer

How to modify material property in bevy

I have a .glb file and I loaded. Then I want to modify the emissive color. How is this possible? fn spawn_main_gltf_scene(mut commands: Commands, asset_server: Res, mut materials: ResMut>) { for i in 0..26…
George C.
  • 6,574
  • 12
  • 55
  • 80
0
votes
2 answers

Rust how to convert Vec to Vec<[f32; 3]> - Given format is Float32 but expected Float32x3

In bevy(0.10) I am discovering the transvoxel module, and in its current state* won't let the bevy_mesh feature to be enabled because of some dependency problems; So I'm manually converting its output to a bevy::Mesh. One of the tasks this requires…
Dávid Tóth
  • 2,788
  • 1
  • 21
  • 46
0
votes
0 answers

Cannot wake up RigidBody after gravity change

I have a cube that is supposed to be floating (gravity set to 0). After an event, the cube is supposed to "fall down" (gravity set to 1). I know that the RigidBody is asleep when gravity is set to 0, so I am trying to wake it up by applying an…
user2393256
  • 1,001
  • 1
  • 15
  • 26
0
votes
0 answers

Bevy - Render to wgpu::Texture

I am looking for an elegant and hopefully bevy-esque way of rendering to a wgpu::Texture. The reason is that I'm am implementing a WebXR libary and the WebXRFramebuffer must be rendered to in immersive XR. let framebuffer = //get framebuffer from…
chantey
  • 4,252
  • 1
  • 35
  • 40
0
votes
1 answer

Is there an 'official way' to insert a bundle from a variable in Bevy?

So I have this component called BulletSpawner which spawns bullets every once in a while. I want this component to be as versatile as possible for my Danmaku game so that I don't have to change it again later. So it has fields like a…
0
votes
1 answer

Can't Deserialize in generic trait function due to lifetime issue, but it works when out of generic function

I would like to implement a trait function that takes a path and gives an owned value. use bevy::prelude::*; use serde::de; pub trait RonResource<'a, T: de::Deserialize<'a> + Resource> { fn import_from_ron(path: &str) -> T { let…
Rayoule
  • 33
  • 1
  • 4
0
votes
1 answer

How to detect a button click and a normal click in bevy

I'm making a tower defense game in bevy and I'm having problems with placing a tower. So basically I want to make it so that when you click one of the buttons (each one spawns a different tower) an asset/sprite of the tower should follow your mouse…
Deutrys
  • 15
  • 5
0
votes
1 answer

Is there a way to configure "exit_on_all_closed" for browser tabs?

I'm currently working on understanding building Rust apps using Bevy in WebAssembly. Under normal circumstances, the exit_all_on_closed variable in the following code allows for the app to close when the window the app is launched in is closed. fn…
tangoti84
  • 45
  • 6
0
votes
1 answer

Reflect enum inspection is not yet implemented

How can I reflect the mode of Timer so that it's visible in the Bevy debug interface - "inspector egui"? Other stats are visible like the current time, a pausing option, etc., just the mode. This is my code: #[derive(Reflect, Component,…
Bruhloon
  • 110
  • 7
0
votes
2 answers

How to add a window icon in Bevy?

I'm making a game in rust and I want it to be legit. Bevy ECS is great. I have been following tutorials and reading documentation, but there is this one thing I want to know. Can I change the window icon? If so, how?
LocalTrash
  • 19
  • 6
0
votes
1 answer

Why does this not render a cube with a texture on all sides bevy?

I'm trying to render a cube with a texture on all sides in bevy. The texture is 16x16 and the cube is 1 bevy coordinate large. This is my code so far: use bevy::prelude::*; fn main() { App::new() …
NaniNoni
  • 155
  • 11