Skip to content

Transform Component broken when using new(pos, rot, scale) #820

@wrestledBearOnce

Description

@wrestledBearOnce

Bug

Calling this constructor:

public Transform(float3 translation, float3 rotation, float3 scale)

with (float3.Zero, float3.Zero, float3.One) fails due to this if-clause:

if (Translation != value)

as the value is already float3.Zero.

In extension of this, it prevents the generation of the _translationMtx via float4x4.CreateTranslation(value);

As the _translationMtx is initialized with float4x4.Zero all translation during scene traversal fails and no mesh is being rendered.

Same applies for scale and rotation.

@ASPePeX git blame: d069b79 😛

Fix

Initialize all matrices of this class with float4x4.Identity

Metadata

Metadata

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions