Skip to content

Manually created meshes are oriented wrong on pipelined-rendering #3030

@sweepline

Description

@sweepline

Bevy version

running on commit 9f47697

Operating system & version

Arch Linux

What you did

Generate a Mesh with a single triangle, using render2 and pbr2.

A snippet can be seen here.

    vertices.push([0.0, 0.0, 0.0]);
    vertices.push([50.0, 0.0, 0.0]);
    vertices.push([0.0, 100.0, 0.0]);
    indices.push(0);
    indices.push(1);
    indices.push(2);

Using a camera with the following transform to look at it:

Transform::from_xyz(0.0, 30.0, 100.0).looking_at(Vec3::new(0.0, 0.0, 0.0), Vec3::Y),

What you expected to happen

I expected the triangle to be perpendicular to the X,Z plane and having a face towards +Z. Like so:
triangle_main

An minimal example of this can be found here: https://github.com/sweepline/bevy-mesh-bug/tree/working-main

What actually happened

The triangle is positioned flatly on the X,Z plane facing towards +Y. Like so:
triangle_pipelined

An minimal example of this can be found here: https://github.com/sweepline/bevy-mesh-bug/tree/master

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions