Skip to content

Supporting orthographic raycasts #1

@popcron

Description

@popcron

so with perspective cameras, its very simple:

CameraMatrices matrices = world.GetComponent<CameraMatrices>(cameraEntity);
Vector2 screenPoint = new(0.5f, 0.5f);
(Vector3 origin, Vector3 direction) ray = matrices.GetRayFromScreenPoint(screenPoint);

and i havent tested this with orthographic cameras recently. last time i tried it didnt work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions