Rotations can limit part access (lays groundwork for doors)
DrprofLuigi opened this issue ยท 1 comments
This adds a new "door" definition to vehicle parts, and rotatableModelObjects.
For example:
{
"partName" : "$busDoor",
"rotationPoint" : [0.40625, 0.8125, 3.5],
"rotationAxis" : [-15.0, 0.0, 0.0],
"rotationVariable" : "p_brake",
"door" : 1
}
{
"pos" : [-1, 1.3125, -1.15625],
"rot" : [0.0, -90.0, 0.0],
"types" : ["seat"],
"customTypes" : ["bus"],
"minValue" : 0.0,
"maxValue" : 1.0,
"doors" : [1]
}
This means that the part is only accessible when the rotation is active. The part can accept multiple doors, so you can access a center seat from either side. This lays the ground work for only sitting in seats when the right doors is open. You can only break engines when the hood is open, access seats when the door is open, get in a bus when the door is open (via parking brake), access cargo when the cargo doors are open, access luggage when the trunk is open, so on and so forth. It could add a new dimension to parts.
If/when we get clickable doors, this will already be set. The existing 'door' rotation variable could be modified and the door numbering system could still be used. If no doors is defined on the part, then it can be accessed at anytime allowing for full compatibility. Multiple rotations can be assigned to a single door (think the rotation top open a hood with a handle, and when there is no engine).
https://discordapp.com/channels/232316230852280320/289084393442639872/721482287669051424