No matter what I do I can't change the scale at all when using ENABLE_TRANSFORM_V1. Need help!
_bulletData.Scale is a float.
#if !ENABLE_TRANSFORM_V1
// This works perfectly.
EntityManager.AddComponentData(e, new LocalToWorldTransform
{
Value = new UniformScaleTransform
{
Position = transform.position,
Rotation = transform.rotation,
Scale = _bulletData.Scale
}
});
#else
// These does not work at all.
EntityManager.AddComponentData(e, new LocalToWorld()
{
Value = float4x4.TRS(
transform.position,
transform.rotation,
_bulletData.Scale
)
});
EntityManager.AddComponentData(e, new NonUniformScale
{
Value = _bulletData.Scale
});
EntityManager.AddComponentData(e, new Translation
{
Value = transform.position
});
EntityManager.AddComponentData(e, new Rotation
{
Value = transform.rotation
});
/*
EntityManager.AddComponentData(e, new Scale
{
Value = _bulletData.Scale
});
*/
EntityManager.AddComponentData(e, new CompositeScale
{
Value = float4x4.Scale(_bulletData.Scale)
});
#endif