Need to rework origins
This commit is contained in:
@@ -21,7 +21,7 @@ void HydraTestCubeActor::InitialiseComponents()
|
||||
// HydraECS* ecs = GetEngine()->ECS();
|
||||
// HydraID entity_id = ecs->CreateEntity();
|
||||
_CreatePosition();
|
||||
_CreatePhysics();
|
||||
//_CreatePhysics();
|
||||
|
||||
_CreateMaterial();
|
||||
_CreateMesh();
|
||||
@@ -33,6 +33,11 @@ void HydraTestCubeActor::DeferredInitialiseComponents()
|
||||
{
|
||||
}
|
||||
|
||||
void HydraTestCubeActor::SetScale(double scale)
|
||||
{
|
||||
m_scale = scale;
|
||||
}
|
||||
|
||||
void HydraTestCubeActor::_CreatePosition()
|
||||
{
|
||||
HydraECS *ecs = GetEngine()->ECS();
|
||||
@@ -51,9 +56,9 @@ void HydraTestCubeActor::_CreateMesh()
|
||||
mesh->vertexes.resize(24);
|
||||
mesh->indexes.resize(36);
|
||||
|
||||
float scale_x = 1.0f;
|
||||
float scale_y = 1.0f;
|
||||
float scale_z = 1.0f;
|
||||
float scale_x = 1.0f * m_scale;
|
||||
float scale_y = 1.0f * m_scale;
|
||||
float scale_z = 1.0f * m_scale;
|
||||
|
||||
float min_x = -0.5f * scale_x;
|
||||
float min_y = -0.5f * scale_y;
|
||||
@@ -177,7 +182,7 @@ void HydraTestCubeActor::_CreateMaterial()
|
||||
|
||||
material.diffuse_texture_id = tex_id;
|
||||
material.diffuse_colour = glm::vec4(1, 1, 1, 1);
|
||||
material.emmissive_metalic_rough = glm::vec4(0.0f, 0.5f, 0.3f, 1.0f);
|
||||
material.emmissive_metalic_rough = glm::vec4(10.0f, 0.5f, 0.3f, 1.0f);
|
||||
|
||||
HydraID mat_id = engine->MaterialBufferManager()->CreateMaterial(material);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user