16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 01:59:19 +02:00

use glm instead of Math3D in vehicle

WARNING: Model rotation is broken
This commit is contained in:
docentYT
2026-04-27 13:07:38 +02:00
parent b712ca4d68
commit fae68642bc
16 changed files with 168 additions and 140 deletions

View File

@@ -46,12 +46,12 @@ light_array::update() {
if( light.index == end::front ) {
// front light set
light.position = light.owner->GetPosition() + ( light.owner->VectorFront() * ( std::max( 0.0, light.owner->GetLength() * 0.5 - 2.0 ) ) );// +( light.owner->VectorUp() * 0.25 );
light.direction = glm::make_vec3( light.owner->VectorFront().getArray() );
light.direction = glm::make_vec3( glm::value_ptr(light.owner->VectorFront()) ); // TODO: It is needed to get value_ptr and then make_vec3?
}
else {
// rear light set
light.position = light.owner->GetPosition() - ( light.owner->VectorFront() * ( std::max( 0.0, light.owner->GetLength() * 0.5 - 2.0 ) ) );// +( light.owner->VectorUp() * 0.25 );
light.direction = glm::make_vec3( light.owner->VectorFront().getArray() );
light.direction = glm::make_vec3( glm::value_ptr(light.owner->VectorFront()) ); // TODO: It is needed to get value_ptr and then make_vec3?
light.direction.x = -light.direction.x;
light.direction.z = -light.direction.z;
}