- Joined
- May 3, 2020
- Messages
- 289
Hi.
I'm trying to implement a 2D camera in mojo2 and manipulate it using the PushMatrix, PopMathix methods of the Canvas, it is works okay if all I want is change the position because I can easily apply offset to the position to keep it centered, however when I rotate and scale the render I noticed it is being rotated scaled at the top left corner. What I would like to do is rotate and scale it around the center instead but can't really find any obvious way to do this. Could anyone please give me some hints how to go about rotating and scaling the render around the center point instead of the top left corner of the screen?
Thank you.
I'm trying to implement a 2D camera in mojo2 and manipulate it using the PushMatrix, PopMathix methods of the Canvas, it is works okay if all I want is change the position because I can easily apply offset to the position to keep it centered, however when I rotate and scale the render I noticed it is being rotated scaled at the top left corner. What I would like to do is rotate and scale it around the center instead but can't really find any obvious way to do this. Could anyone please give me some hints how to go about rotating and scaling the render around the center point instead of the top left corner of the screen?
Thank you.
Last edited: