Expand my Community achievements bar.

Scaling a SharedWhiteBoard

Avatar

Level 4

I used to scale my SharedWhiteBoard by putting it in a canvas and adjusting scaleX & scaleY on said canvas, but a problem has come to light with that technique.

1. Person A starts a sharedwhiteboard with bg image at 800 x 450px and a space available for the whiteboard the same sime.

2. Size of whiteboard is set to match image size

3. Person B enters the same ALCS session with a space for their whiteboard of 1200 x 600px

4. Person B's whiteboard sets its dimensions to 800 x 450px, then uses whiteboard.transform.matrix to scale up to 1200 x 600px

5. Person A draws a line on the whiteboard at x:100 y:100

6. Person B sees a line appear at x:100 y:100 and not, as hoped, at x:150 y:150

7. Both lines also have equal thickness (ie: Person B's line is not half as thick again as Person A's line)

We started using whiteboard.transform.matrix as we had the same effect using whiteBoardCanvasContainer.scaleX = 1.5. It seems however that both scaling techniques fail to produce the desired result. it's as if scaling an actual whiteboard in any way simply isn't possible.

is that true, or is there a way I haven't discovered?

1 Reply

Avatar

Level 4

i have figured out how to do this:

1. ensure that every instance of your SharedWhiteBoard is the same width & height across all connected machines

2. NEVER change this width & height

3. put every instance of your SharedWhiteBoard in a Canvas container that is exactly the same size as said SharedWhiteBoard

4. use the transform.matrix property of your containing canvas to scale the container, but not the SharedWhiteBoard

painful, that was.