#bevy_editor_pls
79 messages · Page 1 of 1 (latest)
I am using bevy_editor_pls in my project whenever I go into editor view where I can move the camera around, I get this error.
thread 'main' panicked at 'index out of bounds: the len is 726 but the index is 726', E:\rust\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_mod_raycast-0.7.0\src\lib.rs:655:29
It doesn't happen straight away and the higher the value of len is (in that error 726) the longer it takes before panicing.
I am generating a mesh though code and believe that it's the cause of the issue. The following is an example mesh (it's generated randomly each time).
Vertices
Triangles
Here is a diagram if it helps
And here's the code where I generate the mesh. I can send more if it would help.
Here is a video showing what happens, as soon as my cursor gets near the mesh it crashes
Hm. Looks like bevy_mod_raycast can't deal with that mesh for some reason.
https://github.com/aevyrie/bevy_mod_raycast/blob/79012e4c7b12896ccfed09a129d163726d3a6516/src/lib.rs#L655 do you have an index that is out of bounds for the vertex positions?
🤦♂️ yes. 154 vertices and the highest index is 155
What are these warnings I get every time on startup and how can I stop them?
WARN bevy_ecs::schedule::graph_utils: bevy_editor_pls_default_windows::debug_settings::fake_time::pause_time wants to be after unknown label: TimeSystem
WARN bevy_ecs::schedule::graph_utils: bevy_editor_pls_core::editor::Editor::system wants to be before unknown label: EguiSystem::ProcessOutput
ah shet we'll need to bump bevy_mod_picking again after this pr gets through https://github.com/aevyrie/bevy_mod_picking/pull/182
messed up when I was bumping to 0.19 and missed one bevy_egui declaration
also now I have noticed that the picking still somewhat goes through the editor in weird cases
it seems fine when you click in any place with a scroll bar, but just docked menus its doesn't seem happy
going to look a bit deeper at that
prob a bug in how egui_dock handles inputs
@sand elk would you prefer more work on bevy inspector egui esque things rather than the more monolithic bevy editor pls? just don't want to pester too much about this if you would want most of the changes in the inspector/in other external crates
and I'm fine either way, I'm somewhat leaning towards using inspector as a base and putting together the egui dock/etc. similar to the examples for the sake of control
I'm not sure yet. I think there is a lot of value in an opinionated tool like bevy_editor_pls that works out of the box, but when possible I'd like to keep its complexity low and push reusable parts of it into their own crates, like the inspector or debugdump
That way people can build their own stuff if they want the flexibility
Is there anything I need to do to make the editor camera show up in the center of the window? I'm just getting gray there, it works fine if I hit play though.
Are using a 2d or 3d setup?
The camera tries to position itself like a preexisting camera if it finds one
3D, I do have an existing camera in the scene
I had that happen with foxtrot where the camera rotation was NaN
I fixed that on main, so if you still have the issue maybe try depending on bevy_editor_pls git and see if it's fixed?
huh that's interesting, is there any way I can avoid that myself?
I'm not sure what caused it
my solution was just to not copy the camera transform if any part of it isn't finite
Is the main branch compatible with bevy stable? I don't wanna do a whole big port for now ^^
it is
okay, might give that a shot then
If this is an issue on the current Foxtrot release, I could patch in the newest bevy_editor_pls on main
I'll definitely release version before the jam so if that's enough you can depend on 0.4 then
I logged an issue yesterday, I can't make this crate run with 0.10, it panics on Cow on every start 🥲 Anyone seen that? I'd really like to try it out on my game.
https://github.com/jakobhellermann/bevy_editor_pls/issues/75
I don't know why it broke but maybe you can fix this for now with a register_type::<Cow<'static, str>>() for now
I'm encountering a panic when including the EditorPlugin and my systems are arranged in a certain way:
app
.add_systems(Update, update_pointer_state_from_window.pipe(on_error))
.add_plugins(MyPlugin);
// MyPlugin
app
.add_systems(
Update,
(,
foo.pipe(on_error),
bar.pipe(on_error),
)
.chain() .after(update_pointer_state_from_window);
);
Specifically it seems to crash inside of bevy_mod_debugdump:
fn system_of_system_type(&self, system_type: TypeId) -> NodeId {
let system_node = self
.graph
.systems()
.find_map(|(node_id, system, _)| (system.type_id() == system_type).then_some(node_id))
.unwrap();
system_node
}
It seems to work ok if I rearrange the schedule a bit (by moving the update_pointer_from_window system into MyPlugin.
I'll play with it a bit more to see if I can make a more helpful repro.
yarn
is it correct that currently its not compatible with bevy 11?
I currently get:
missing fields `grid_auto_columns`, `grid_auto_flow`, `grid_auto_rows` and 5 other fields in initializer of `taffy::prelude::Style`
yeah, the compatible version has not been released yet last I checked
it seems like bevy_editor_pls is not working with kayak_ui. Previously this problem was solved by adding editor in kayak plugins in correct order, but with bevy 0.11 it does not work in any order
is there any solution for issue with kayak_ui?
I just realized I fat-fingered this message somehow. Sorry for that! 😄
Does anyone else have issues with the current main branch with mouse panning (middle mouse button) and rotating (right mouse button)?
For me I currently can't rotate around, movement with WASD works as expected.
it seems to be realted to: Editor.viewport_interaction_active returning false as soon as the right mouse button is clicked.
commenting out the second part in the cameras\mod.rs
editor_cam_3d_panorbit.1.enabled = active;// && editor.viewport_interaction_active();
seems to make it work again, but not sure if that would lead to other issues 🤔
Yeah that was the reason why I didn't wanna release a new version yet
Oh nice that's a good lead at least
I'll check that out but anyways that should be a good enough workaround to publish a release. The only effect will be that dragging something in the UI will also move the camera
Sorry if I missed this somewhere, but what does the UI checkbox do?
If you don't toggle it, then bevy UI cameras won't be shown in the editor mode
ahhh got it. ty!
to add my resource in the resources tab, should it be enough to just register that resource in type_registry with register_type?
I see here is a filtering of resources that have some data https://github.com/jakobhellermann/bevy_editor_pls/blob/main/crates/bevy_editor_pls_default_windows/src/resources.rs#L33
but I don't understand what special data it might be and how to just display regular resource with it's regular data
managed to add my resource there like this:
.register_type::<PlayerCoins>()
.register_type_data::<PlayerCoins, ReflectResource>()
but not sure I understand why exactly this needed.. What is this ReflectResource? just a way to mark resource to appear in editor or is it something more?
time doesn't seem to stop when triggering editor or controls::Action::PauseUnpauseTime. Am I holding it wrong?
ah, it has to be explicitly stopped in editor -> debug settings. aforementioned action seems to be broken, then…
Does anyone else experience the camera jumping when the right mouse button is pressed in the editor?
I can reproduce it on the latest commit, when using the MacOS platform.
(Also could replicate it on Windows 11)
doesn't happen to me
The gizmos produce very odd behavior in combination with bevy_xpbd
picking up a cube causes it to fly off the screen
I don't exactly get why, but it has to do with the gizmo code
- using the current (not initial) transform of the object to determine the axis
- bevy_xpbd introducing slight constant slight deviations in orientation
I think this explains the off axis movement.
For the extreme on axis movement:
I think what is happening is xpbd is constantly increasing negative Z linvel due to gravity, eventually the single tick change in Z plus orientation errors leads to wacky behavior
I think the gizmos need to compute based on start position and orientation.
Hi, is there a simple way to set initial camera mode for the editor (e.g. 2d) via system?
Didn't found any easy way to do this, so I've forked the repo, exposed similar function to what viewport_toolbar_ui does:
https://github.com/jakobhellermann/bevy_editor_pls/issues/99#issuecomment-2118846243
Maybe an overkill, but exposing something similar would be a nice addition to provide custom tooling for the editor.
Hello. Any plans to update bevy_editor_pls to bevy 0.14?
there a wip PR you can use: https://github.com/jakobhellermann/bevy_editor_pls/issues/109
yeah, I saw it, work great
I have been working on a filtering system for the Hierarchy window with the new dynamic queries:
(shortform for the components: w: -> With, x: -> Without, i: -> Index of entity)
If there is interest, is there any chance it could be upstreamed?
(the fork with the feature can be tried out here: https://github.com/Occuros/bevy_editor_pls)
I'd definitely be interested in an upstreaming of that feature