Menu

Click TGLHUDSprite

Help
Daniel
2018-09-04
2018-09-11
  • Daniel

    Daniel - 2018-09-04

    Hi!

    Maybe I'm tired, but I cannot figure out how to get if the user clicks my TGLHUDSprite...

    if scene.buffer.getPickedObject(x,y) = myHudSprite then
    {do stuff...}
    

    Does not seem to work.

    Any ideas how to do it?

    Cheers!

     
  • Jerome.D (BeanzMaster)

    Hi, Daniel THUDSprite is not 3D object so you can't uses getpickedObject method to raycast it

    See this blog (in russian many interressting and hight quality samples on how use TGLHudSprite for making cool gui by selecting object and or by dragging. : http://lampogolovii.blogspot.com/search/label/glscene

    if you're not able to download source code i'll made you a zip

    Just for fun a complete game i've just found https://github.com/perfectdaemon/space-sim

     
  • Daniel

    Daniel - 2018-09-06

    Thanks for the links!
    They are very useful and gives good solutions.

     
  • Jerome.D (BeanzMaster)

    Hi Daniel could you download the source code of the examples ?

     
  • Daniel

    Daniel - 2018-09-11

    Hi Jerome!
    I didn't try actually. The text examples on the pages are plenty help for me!
    Thanks!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.