FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.65k stars 345 forks source link

Wrong colors when debugging physics #331

Closed martin-t closed 2 years ago

martin-t commented 2 years ago

DebugRenderBackend::draw_line receives color as HSLA but fyrox reads it as RGBA. This results in most lines being white/yellowish.

This doesn't appear documented on the function itself, only here, but rapier's tests/examples treat it as HSLA: https://github.com/dimforge/rapier/blob/master/src_testbed/debug_render.rs#L45

Rapier issue about clarifying the docs: https://github.com/dimforge/rapier/issues/370

mrDIMAS commented 2 years ago

Good catch! I'm very surprised that the color is not in RGBA. I'll create Hsl color conversion to bypass this.