@dev24984
I do have same issue.
floor.walls are not in same order, and there are inner walls.
floor.polygonCorners is not oriented the same way
(transform.eulerAngles.z and .y is 0)
I attempted algoritm to calculate the distance of each wall, and between each polygonCorners , to try to match them
If I find the matching wall, I get the angle to apply.
I still use the floor.transform.position to position the floor correctly.
-> distances are not exactly the same, so I have to do several pass to find the matching wall, with a difference increasing (0.01)
-> it works as along as the walls are not identical
else orientation can be 180 degres wrong
and sometimes it fail entirely (round room)
So unsure this is the way, unless I attempt to match inner walls as well.
Else another idea could be to figure out the outer walls of the rooms, gather each translated end point, and make a surface out of it.
if only apple has properly filled its transform for the floor :(
Topic:
Graphics & Games
SubTopic:
SceneKit
Tags: