Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated interactive examples to bevy 0.12.1 #20

Closed

Conversation

AnAverageGitUser
Copy link

Hi there, I've recently looked at the interactive example on the "interactive" branch as it helped me understand a bit. This example is not yet ported to the current bevy version (0.12.1).
I thought I'd give it a try. It's FAR from perfect, but maybe a starting point for others that want to update/try it on the current bevy version.

Needed Fixup 1

I had to change one dependency in interactive/Cargo.toml:

bevy_transform_gizmo = { git = "https://github.com/mockersf/bevy_transform_gizmo", branch = "0.8-themed" }
# to
bevy_transform_gizmo = { git = "https://github.com/ForesightMiningSoftwareCorporation/bevy_transform_gizmo", branch = "main" }

branch main is obviously not the best choice, but at least it compiled for the time being.

Needed Fixup 2

Because of how I create the UntypedHandles my solution currently only works with a nightly compiler that has #![feature(const_type_id)] enabled, because I use TypeId::of::<Mesh>() and TypeId::of::<StandardMaterial>().

Note / Question

The whole lot of HANDLE_NAVMESH_WIREFRAME etc. seems now to be created in a weird way, but the bevy migration page (and other material) wasn't that helpful in finding how it's supposed to be done now. But of course I could have overlooked something, If anybody who has more knowledge regarding bevy, giving a hint/link/example is appreciated.

@AnAverageGitUser
Copy link
Author

Damn, somehow I overlooked the other pull request solving this exact same thing, but better ( #19 ).

😅

@AnAverageGitUser
Copy link
Author

For anyone still wondering about my "Note / Question" it can be updated like this:

const HANDLE_TARGET_MESH: HandleUntyped = HandleUntyped::weak_from_u64(Mesh::TYPE_UUID, 5);

to

const HANDLE_TARGET_MESH: Handle<Mesh> = Handle::weak_from_u128(1639694912);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant