Post

Replies

Boosts

Views

Activity

Comment on How to get a 2D floor plan with dimensions from RoomPlan
Hey Brent, Don't be sorry ;) Basically, the dimensions give me the span (that is indeed the length) of the wall. This doesn't tell me anything about the position or rotation of the wall, just it's length or x value. I believe the direction you're after is the zRotation of my wallNode. It is calculated from the eulerAngles out of the transformation matrix.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Mar ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
Hey @Brent185, Glad it cleared things up! The scalingFactor is just an arbitrary number to make sure the size of the surfaces and objects is big enough to see in the SKScene. The actual number inside dimensions and transform is in meters, so to convert to 'actual dimensions' you have to do nothing! :D I apply a scalingFactor, otherwise a wall of 5 meters would be 5 points long and in most SpriteKit scenes, this is so small, you would barely see it.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Apr ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
Hey I've posted a follow up answer. Hope this clears thinks up. If not, I'm planning on writing something better and more elaborate but I'll have to do a lot more refactoring in order to have something to post since my code is quite split up into different functionalities.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Nov ’22
Comment on How to get a 2D floor plan with dimensions from RoomPlan
Hey Brent, Don't be sorry ;) Basically, the dimensions give me the span (that is indeed the length) of the wall. This doesn't tell me anything about the position or rotation of the wall, just it's length or x value. I believe the direction you're after is the zRotation of my wallNode. It is calculated from the eulerAngles out of the transformation matrix.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
To summarise: The transform contains all the information about the position and rotation of the wall. The dimensions only holds the length of the wall. I don't calculate the two points of the wall, but rather create a line that is the correct length and place that line in correct position at the right rotation. Hope this helps ;)
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
I'm currently writing a full length article about this which is about half way done. I hope this clears everything up as I find it quite difficult to explain with little words :p. It'll most likely take a couple more weeks to be published though, sorry for the wait.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
I've created a sample project: https://github.com/denniswave/RoomPlan-2D
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
Definitely! See my project: https://github.com/denniswave/RoomPlan-2D
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
Hey @Brent185, Glad it cleared things up! The scalingFactor is just an arbitrary number to make sure the size of the surfaces and objects is big enough to see in the SKScene. The actual number inside dimensions and transform is in meters, so to convert to 'actual dimensions' you have to do nothing! :D I apply a scalingFactor, otherwise a wall of 5 meters would be 5 points long and in most SpriteKit scenes, this is so small, you would barely see it.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
Hey @AnjaliNirmale, you can take the rotation of the longest surface and rotate the entire floor plan the same amount in the opposite direction. This way the longest line will be straight and your floor plan will appear to be straight.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on How to get a 2D floor plan with dimensions from RoomPlan
If you've added all the walls and object to a parent node, you can just rotate that node. Technically the SKScene is the root node but I wouldn't advise rotating that, if possible at all.
Topic: Graphics & Games SubTopic: SceneKit Tags:
Replies
Boosts
Views
Activity
Jun ’23