Invert mouse position detection

Hey guys.
I'm building a b2d application for a little touchscreen at university.
My problem is that the touch detection of the display is turned by 180 degrees. That means: If i tap on the top right corner, it reacts on the left bottom corner.

How can i invert the mouse detection of box2d flash with actionscript?
would rotating the movieclip that contains the physics world 180º help? test a contrast of the local mouseX and Y and the stage mouseX and Y.

i assume what you are trying to control is not something that you manually provide the x,y to. or else you could manually alter the numbers like newX = 800 - mouseX and newY = 600 - mouseY (assuming a stage size of 800x600) and pass newX and newY instead of mouseX and mouseY.

there are also transform matrix's you could play with if it gets more complex than that. but i don't imagine it would.

ps: half way through your post i would have imagined a 90º difference, where mouseX is the Y and mouseY is the X but i guess it's just in my head. 😛
thank you 😀

i rotated the movieclip that contains the physics by 180. it only turned the physical reactions around, but not the mouse input :/

Quote:
i assume what you are trying to control is not something that you manually provide the x,y to. or else you could manually alter the numbers like newX = 800 - mouseX and newY = 600 - mouseY (assuming a stage size of 800x600) and pass newX and newY instead of mouseX and mouseY.


yeah. that might be the solution. but where do i have to pass the newX and newY to so that it changes? is there maybe a box2d class where i have to replace the original values?

💡
nobody?

it's only singletouch (like a normal mouse), should be easy.
similar topic if that helps
viewtopic.php?f=19&t=6474

Original thread: https://box2d.org/forum/viewtopic.php?t=6458