guiDynamicTexture (GuiTextureCanvas) revisited

Scripts and codes that enhances or changes the GUI in the engine.
37 posts Page 2 of 4
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Sun May 31, 2015 5:06 pm
@
User avatar
Azaezel
:

Perhaps I missed something in the engine code merge...

If I put a little echo comment in my default.bind, within the mousefire command, under the if statement for gui interact, and it never displays the echo in the console.

So... My gui interact stuff is not functioning or something.

I will look again at the merge, but I really feel I got it right. Is there something perhaps I should be looking at specifically in the engine code to make sure that clicking portion works?

Thanks
P
Azaezel
Posts: 353
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Sun May 31, 2015 7:47 pm
Check https://github.com/Azaezel/Torque3D/com ... 15a6b5R152 if it's not detecting interaction period.
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon Jun 01, 2015 12:39 am
Thanks, just double-checked the merge and I have all your code in there correctly.

I see the LOS mask, you added StaticShapeObjectType, I had done that so am not sure what I'm missing...

The object I'm placing is a StaticShape, has a datablock, it comes up properly showing the gui I want, I just have no mouse control and the cursor/reticle doesn't change or anything.

I'm running the latest 3.7 AFX Full build from GitHub as my base, all that stuff works great, anything that AFX could be doing that would be disabling this somehow perhaps? I can't think of anything else, as I have set it all up identically to how you had it in the guionobject github repo.

Thanks!
Azaezel
Posts: 353
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Mon Jun 01, 2015 1:27 am
nah, have afx rolled in this end as well... StaticShape, Not TSStatic like that dynamic_cast check? The UV detection end of things kind of falls apart if it's not wysywig/nonanimated. (Could cook up a custom class, but left that off for simplicity of tracking what was going on.). We got around that limitation this end by hotswapping an animated shape out via the following:

sometriggercallback

Code: Select all

         %owner.screenAnimation.setHidden(false);
         %owner.screenAnimation.playThread( 0, "open" );

+

Code: Select all

function monitorData::onOpen(%this,%obj)
{
   %obj.owner.screen.setHidden(false);
   %obj.schedule(300,"setHidden",true);
}
//see: https://github.com/GarageGames/Torque3D/pull/682

where .screenAnimation is a staticshape reference with an animation and .screen is a tsstatic with visible mesh flipped on for the collision end of things.
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon Jun 01, 2015 2:02 am
Oh oops, you mean I should just straight TSStatic this sucker instead of going with the datablock StaticShape? That's no problem, they don't have to be StaticShapes, I can easily swap them out for TSStatics and see if that helps.

Should have noticed that in the dynamic cast that it was looking for TSStatic when I have StaticShapes I'm trying to do this with. Duh!

Thanks, will try and see if that does it.
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Mon Jun 01, 2015 2:15 am
Yep that did it :)

Have interaction being detected now! Although it does not seem to be actioning when I click... That doMouseClick function i see in the default bind, is that something that is in the engine or that I have to add in script somewhere?

Close!
Azaezel
Posts: 353
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Mon Jun 01, 2015 3:52 am
PaulWeston wrote: That doMouseClick function i see in the default bind, is that something that is in the engine or that I have to add in script somewhere?

https://github.com/Azaezel/Torque3D/com ... 8560d7R304
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Fri Jun 05, 2015 6:40 am
I got this working finally after just a bit more tinkering...

Works great, thanks much for the help!

One thing I am curious about though - when I pop into Oculus Rift mode it does not detect the interaction, I get no mouse cursor or any control, clicking just fires my weapon. My crosshair just stays normal as I pan across the Gui, like it doesn't recognize it.

Anything you can think of that I have to tweak to make this work? I know it is possible to have dual-cursor for the Rift, as we see it in the Awesomium kit we have :)
Azaezel
Posts: 353
Joined: Tue Feb 03, 2015 9:50 pm
 
by Azaezel » Sat Jun 06, 2015 9:38 am
Afraid I don't have a working knowledge of occulous there, though to be clear, is this with the latest revamp or an older version? (It's been refactored in development.)
PaulWeston
Posts: 143
Joined: Thu Apr 23, 2015 7:16 pm
by PaulWeston » Sat Jun 06, 2015 4:41 pm
I'm using the code from your GuiOnObject GitHub repo...

Cool that it's still being tweaked in development - what has changed between that version and the one I have?

I will keep looking at the Oculus issue - it looks like it just has something to do with when the raycast is firing, like it is not firing when in Oculus mode. Perhaps by looking at how Stefan did it in the Awesomium kit will point me in the right direction.

Thanks!
37 posts Page 2 of 4

Who is online

Users browsing this forum: No registered users and 1 guest