About Store Forum Documentation Contact
Donations:
289$/mo



Post Reply 
How to rotate Gui Region?
Author Message
ronghester Offline
Bronze Supporter

Post: #1
How to rotate Gui Region?
Hi,

I have a region holding image in a HUD and I wanted to rotate the region when camera angle changes? Not able to find out any simpler method rotate the region.

Could you point out the function which can be used for region rotation.

Thanks
12-14-2016 09:12 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: How to rotate Gui Region?
Hi,

Sorry there's no builtin rotation for gui objects.

You have to use something like Image.drawRotate
12-15-2016 12:55 AM
Find all posts by this user Quote this message in a reply
Zervox Offline
Silver Supporter

Post: #3
RE: How to rotate Gui Region?
alternatively use render to texture with VI or similar.
12-15-2016 01:28 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #4
RE: How to rotate Gui Region?
i do drawing of my compass this way, if this can help you in any way smile works like a charm, just add it to your game drawing
Images(UID(1949062989, 1262938674, 2093222833, 1357074473)).drawRotate(Vec2(D.w()-0.26-0.012, D.h()-0.235-0.01), Vec2(0.042, 0.086), Plr.angle.x);

if you want it to be link to a region you can always check the region pos and size smile
(This post was last modified: 12-15-2016 02:28 AM by RedcrowProd.)
12-15-2016 02:25 AM
Find all posts by this user Quote this message in a reply
ronghester Offline
Bronze Supporter

Post: #5
RE: How to rotate Gui Region?
RTT would be heavy for a simple HUD with background image showing player position so I would try to use two regions and replace them when camera angle changes.

No worries!

smile
12-15-2016 02:52 PM
Find all posts by this user Quote this message in a reply
Post Reply