Will Posted June 28, 2022 Share Posted June 28, 2022 Does anyone know how to find out if a PIO object has been mirrored horizontally or vertically? I've tried testing using IsObjectFlipped but this doesn't tell you if its been flipped about the X or the Y axis. So then I tried using FlipHybridMatrix and testing again but this Function doesn't seem to do anything inside a PIO. (note the handle to the PIO instance is stored in self.handle) def isFlippedHorizontal(self): if vs.IsObjectFlipped(self.handle): vs.FlipHybMatrixObj(self.handle, 1) #flip vertical and test again then flip back. If still flipped then rerturn true r = vs.IsObjectFlipped(self.handle) vs.FlipHybMatrixObj(self.handle, 1) return r else: return False In theory GetObjectVariableReal(h, 102) should return the scale of the PIO object, and it should be negative if it is flipped about the X axis but it always returns a very small positive number when used on a plugin handle. Anyone got any other ideas for how to hack a workaround for this problem? Quote Link to comment
Will Posted June 28, 2022 Author Share Posted June 28, 2022 (edited) Well this question is pointless, I just realised that it doesn't matter. Imagine standing looking a roof panel, one side clips over the other side so you need to know which side has the covering bit (the 'overcloak') and which side has the seam the fits under the covering bit (the 'undercloak') If your panel is flipped vertically then the observer is rotated 180 to stand looking at the panel but the overcloak and undercloak have stayed on the same sides as before the flip so when you stand rotated 180º looking at the panel from the front the overcloak and undercloak have swapped sides. Likewise, if you stay in the same place and flip the panel. the overcloak and undercloak have swapped sides. So the answer to my question is 'it doesn't matter' because I am an idiot... If the panel is flipped the undercloak has swapped sides with the overlcloak regardless of whether it was a horizontal flip or a vertical flip. So when I report the panel in my list if IsObjectFlipped() returns true I report left as right and right as left and everything is golden! Edited June 28, 2022 by Will autocorrect inserted some weird words 1 Quote Link to comment
MullinRJ Posted June 28, 2022 Share Posted June 28, 2022 (edited) FLIPPED doesnot have an axis implied when it it detected. Flipped Horizontally, and Flipped Vertically are the same thing, except the final rotations differ by 180°. VW default flip is vertical, meaning the rotat... — Okay, never mind. you figured it out. Raymond Edited June 28, 2022 by MullinRJ 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.