Finding Screen Size
by Bob Blackmon · in Torque 2D Beginner · 02/25/2014 (8:06 pm) · 5 replies
How do I find the size of the window in windowed mode and/or fullscreen mode?
Alternatively, how can I prevent my sprites from stretching based off screen size?
Alternatively, how can I prevent my sprites from stretching based off screen size?
#2
I used that and mySceneWindow commands to stop my sprites when they were stretching:
Not sure if that's what you were looking for.
02/26/2014 (2:06 am)
In canvas.cs you can see what your setting the resolution to%resolution = "800 600 32";
I used that and mySceneWindow commands to stop my sprites when they were stretching:
mySceneWindow.setCameraPosition(0, 0);
mySceneWindow.setCameraSize(112, 99);
mySceneWindow.setCameraZoom(1);
mySceneWindow.setCameraAngle(0);Not sure if that's what you were looking for.
#3
garagegames.github.io/Torque2D/TorqueScriptDocs/html/group__VideoFunctions.html
To prevent stretching, make sure the aspect ratios of your resolution match your camera view size.
02/26/2014 (4:11 am)
Here is a list of TorqueScript functions available to help you with video resolutions:garagegames.github.io/Torque2D/TorqueScriptDocs/html/group__VideoFunctions.html
To prevent stretching, make sure the aspect ratios of your resolution match your camera view size.
#4
02/26/2014 (12:05 pm)
Thanks everyone. Mike, those functions were exactly what I was looking for.
#5
Some days, I'm really proud of this community!
02/26/2014 (12:30 pm)
Awesome to see that every answer provided here was correct, just coming from different approaches to the problem.Some days, I'm really proud of this community!
Torque Owner Stephen
GearedMind Studio