Commit ff75af82 by wester

rotation

parent 1b637bdd
......@@ -132,8 +132,20 @@ void ATilesetActor::parseInstanced3DTile(const TArray<uint8> data, FTile * tile)
for (FVector pos : positons)
{
outputString += "[" + pos.ToString() +"] ";
gltf->clone(pos);
AProceduralEntity* clone = gltf->clone(pos);
if (JsonParsed->GetBoolField("EAST_NORTH_UP")) {
FVector up(pos);
up.Normalize();
FVector Z(0, 0, 1);
FVector east = FVector::CrossProduct( up,Z );
FVector north = FVector::CrossProduct(east, up);
FMatrix NEU(north, up, east, pos);
clone->SetActorTransform(FTransform(NEU));
}
}
gltf->SetActorTransform(FTransform(positons[0]));
outputString += "]";
UE_LOG(TILES, Warning, TEXT("InStanced 3D Model Positions %s"), *outputString);
}
......
......@@ -118,7 +118,7 @@ struct FTile
UPROPERTY()
TArray<float> transform; //16 Elemete
//TODO "default" : [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ]
//"default" : [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ]
UPROPERTY()
FTileContent content;
......@@ -310,3 +310,4 @@ inline TArray<T> ATilesetActor::getAsArray(const uint8 *data, int32 offset, int3
result.Append(ArrayPointer, numberOfElements);
return result;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment