ronghester
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|
Zervox
Member
|
RE: How to rotate Gui Region?
alternatively use render to texture with VI or similar.
|
|
12-15-2016 01:28 AM |
|
RedcrowProd
Member
|
RE: How to rotate Gui Region?
i do drawing of my compass this way, if this can help you in any way 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
(This post was last modified: 12-15-2016 02:28 AM by RedcrowProd.)
|
|
12-15-2016 02:25 AM |
|
ronghester
Member
|
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!
|
|
12-15-2016 02:52 PM |
|