#[RESOLVED] dissapeared objects

22 messages · Page 1 of 1 (latest)

misty basin
#

Hello, can someone please review my code and tell me why I cannot see any object?
They have dissapeared as I started to play with the MeshPickingExample code. I seem to cant figure out why.
Thanks

drowsy harness
#

What can you see on screen?
Is the camera perhaps just pointing somewhere else?
Or too close to the ground, so your objects are out of view?
Or too close to the target, so your cube is being culled?

There's nothing in your code that immediately stood out to me as an issue.
I think whatever your view::pan_orbit_camera is doing might play a part in this.

#

Albeit that's just speculation on my part, it could very well be something entirely different

misty basin
#

Thanks for checking this out. This is what I see. I have tried to replace the pan_orbit_camera with the original one from the example. No change.
This is the example: https://bevyengine.org/examples/picking/mesh-picking/

azure vector
# misty basin Thanks for checking this out. This is what I see. I have tried to replace the p...

its quite hard to understand whats going on here, but i recommend using something like bevy_inspector_egui to view and potentially edit the components of your entities live, like making sure the camera isnt bugged and pointing in the entirely wrong direction, manually moving around the static meshes by editing their transform to see if you can get them moved into the camera view, etc.

misty basin
misty basin
#

It seems the bevy_inspector_egui has some compatiblity issues with bevy 0.15, did you get it working for this version?

azure vector
misty basin
#

cargo run
Blocking waiting for file lock on package cache
Updating crates.io index
error: failed to select a version for web-sys.
... required by package bevy_egui v0.31.0
... which satisfies dependency bevy_egui = "^0.31" of package bevy-inspector-egui v0.28.1
... which satisfies dependency bevy-inspector-egui = "^0.28.1" of package first_3d_example v0.1.0 (C:\code\rust_project\first_3d_example)
versions that meet the requirements ^0.3.74 are: 0.3.76, 0.3.75, 0.3.74

all possible versions conflict with previously selected packages.

previously selected package web-sys v0.3.72
... which satisfies dependency web-sys = "^0.3" of package bevy_render v0.12.0
... which satisfies dependency bevy_render = "^0.12" of package bevy_mod_picking v0.17.0
... which satisfies dependency bevy_mod_picking = "^0.17" of package first_3d_example v0.1.0 (C:\code\rust_project\first_3d_example)

failed to select a version for web-sys which could resolve this conflict

this is the toml file:
[package]
name = "first_3d_example"
version = "0.1.0"
edition = "2021"

[dependencies]
bevy = "0.15.1"
bevy_mod_picking = "0.17"
bevy-inspector-egui = "0.28.1"

[features]
default = ["bevy/default"]

azure vector
#

oh, bevy_mod_picking is a very old version. you don't need that at all anymore since 0.15 made picking part of bevy itself

#

so that old version of picking is pulling in a old version of bevy_render which requires a old version of web-sys - this means you get this conflict when you try to also add the inspector, which requires the recent version

#

you should have gotten issues long before this tho, using bevy_mod_picking for bevy 0.12 with bevy 0.15....

#

@misty basin tldr remove bevy_mod_picking, its old

misty basin
#

thanks for pointing out whats going on with cargo, Ive removed the bevy_mod_picking and Ive got the egui up and running

#

I see few strange (strange to me) things, Camera has viewport set to None and there are zero visible entties. If I set camera to Some which is the only other option the buttons dissapear.

#

Ok, so visible entities and camera None viewport are both fine, this is from the example code.

#

Think I found the reason, this is from my app, there is no mesh nor material assigned to the entities

inland crater
#

They have mesh and material, but they are missing the visibility components

misty basin
#

I dont see that in the example code, any idea why do I need to add that for my code?

inland crater
#

you created you own Mesh3d and MeshMaterial3d, you should use bevy's one

misty basin
#

Thanks, that was it.

#

And also the camera was a bit misplaced, I made a typo