New devlog about the interior customization mechanics that I recently started working on. Check it out!
https://www.youtube.com/watch?v=LolFk3QAOEc
#gamedev #procgen #indiegame
Customizing The Interiors Of My Procedural City
YouTube
New devlog about the interior customization mechanics that I recently started working on. Check it out!
https://www.youtube.com/watch?v=LolFk3QAOEc
#gamedev #procgen #indiegame
YouTube
@toerror Yeah I am actually still experimenting with the details of the placement mechanics. The problem with your suggestion is that the 9bjects don't really have an "up" orientation or a default placement direction 😊 What I do want to add though is the ability to switch the rotation axis like in NMS and also switch the angle snapping on/off so the player can fine tune an object's placement if they want.
@vuntra_city Sorry - the "up" would be the world space up transformed into the object space of the object when you start to move it from it's current position. So say the TV is on the wall as a human would expect, and you place it onto the curved sofa, the "up" axis from when it was on the wall would be locked to the plane described by the tangent of that vector.
@vuntra_city I'm thinking how it might be possible to move something from it's current location without it snapping to strange orientations.
@toerror Yeah that's what I mean. The "human expected" object up direction is not obvious for most objects. I could add a possibility to specify it though 🤔
@vuntra_city It's that bit where you drag a tv from the wall to the floor and it flips round. If the current up vector were snapped to a plane that it's already on at the start of the drag operation, it won't flip round strangely. ( sorry... words are hard 😉 )
@toerror No I got that. The problem is those rectangular objects look deceptively simple but model wise their "up" axes are all over the place because different ones are spawned by different algorithms. I could of course refactor all that... And I should... Someday 😆
@vuntra_city So the "up" vector I'm talking about is the world space up axis - you know what the relation between the object's transform and that vector is at the start of the drag operation, and you can constrain any rotation that's applied to the object to a plane that that vector lies along.
Imagine the TV on the wall, you are about to drag it.
Imagine a plane running through the TV - like a wall passing through it. Move the TV, but only rotate it on the normal of that plane.
@toerror There are two problems with this: 1. Using the start of the transform to restrict movement is bad because transform can start from anywhere - floor and ceiling included. And like I said objects don't store any "original" orientation. And 2. What happens in your example when you drag it from one wall to a perpendicular wall? There is no rotation around that axis that gives it a correct orientation in that case.
@vuntra_city I laughed at the toilet use =)
A suggestion wit object placement orientation on angled surfaces - maybe allow the player to "lock" the up axis to the plane it's currently tangental to, and then move the object ( so hold down a button when moving to lock the alignment )?