PistonDevelopers / hematite

A simple Minecraft written in Rust with the Piston game engine
http://hematite.piston.rs/
MIT License
1.86k stars 105 forks source link

Got hematite working with glutin. #264

Closed leroycep closed 8 years ago

leroycep commented 8 years ago

However, I couldn't get the camera working. Uncommenting the camera update line gives the error: "the trait bound piston_window::Event: piston::input::GenericEvent is not satisfied"

I still need to do some work, but some help on the error would be nice.

bvssvni commented 8 years ago

I think Glutin does not have relative mouse movement when capturing a cursor, so the camera doesn't work. I opened https://github.com/tomaka/glutin/issues/774.

mattico commented 8 years ago

All this needs to work is to update the pistoncore-glutin_window dependency to 0.26.1 to support the newly added mouserelative events.

mattico commented 8 years ago

After trying this locally, the glium version feels a bit weird with the mouse. I'm not sure if there's something with the mouserelative implementation or if the sensitivity is just crazy high.

mattico commented 8 years ago

It looks like the camera controller has no built-in way to control the mouse sensitivity, that's probably the best place to do it. It seems like good functionality to have anyway. I've opened an issue: https://github.com/PistonDevelopers/camera_controllers/issues/31

mattico commented 8 years ago

Thanks @Geemili!

leroycep commented 8 years ago

You're welcome! :)