Skip to content

Object mouse selection by the renderer #671

@TheJJ

Description

@TheJJ

Currently, the outline of the unit does not matter for selecting it.
We have to build the renderer (#34 #286 #287) in such a way we can tell which pixel belonged to what unit.

This allows us to click anywhere in the game and then determine what object was drawn there.

https://capnramses.github.io/opengl/raycasting.html
https://en.wikibooks.org/wiki/OpenGL_Programming/Object_selection
http://schabby.de/picking-opengl-ray-tracing/

Fixes #368
http://www.lighthouse3d.com/tutorials/opengl-selection-tutorial/

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: rendererConcerns our graphics rendererjust do itYou can start working on this, there should be nothing left to discusslang: c++Done in C++ codenice new thing ☺A new feature that was not there before

    Projects

    Status

    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions