Announcement

Collapse
No announcement yet.

Scaleform in RTT, problems with code and mouse input

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Scaleform in RTT, problems with code and mouse input

    Hello everybody !

    I've made a huge scaleform menu for character creation. It use massively the AS to manipulate unrealScript. EG : by choosing a color for an element of the character (clic on a button in scaleform), we apply the color in the material for the character (with "ExternalInterface.call").

    When I use my scaleform menu as a UI (by not render it in a texture with kismet), everything works flawlessly.

    Now, I wish to render my scaleform in a texture, then use the texture in a Material on a mesh.

    thanks to https://forums.epicgames.com/threads...ocus-using-RTT, I can move my mouse in the scaleform in My RTT but when I clic on a button, nothing happens. Even before to push a button, AS have to launch some functions that alter the scene (camera placement)... They don't.

    So, I thing I my dummy.swf capture the mouse mouvement (even if I don't check the focus and capture box in kismet, see the topic I linked before) and somehow send them to my gameply.swf in RTT (the mouse in it move), but I can't clic on button and the functions called by AS in the RTT don't seems to "reach" Uscript...

    edit : In fact, functions ARE launch and "reach" Uscript with no problem. My real problem have nothing to do with this ^^. But the mouse input problem remains... I still can't push any button in my scaleform, even if the mouse moves.

    What have I forgotten ?

    edit 2 : Some intel : when the mouse fly hover a button, the onRollOver statement in my button fires normally. The mouse movieclip follow the _xmouse and _ymouse in a mouse listener. both of them works fine. It's really the mouse down/up that I don't receive in the RTT... Maybe have I to declare them (plus the mouse wheel) ina capture key with kismet ?

    #2
    I am not using Oculus Rift but I want to have my Main Menu sticked on a rock and a mouse with whom I can hover over it and press it....how did you made visible mouse(because when I apply my swf file to texture my mouse dissapears)?

    Comment


      #3
      I think that you don't take your problem in the right way :
      I have a movieClip in my swf that move according with the mouse coordinates in the screen space (mouse listener).
      It's not a problem for me because my swf use almost the entire screen space and that's why the movement of my mouse clip seems to be the movement of the mouse in the screen space.
      If you want to be able to clic on some actor in the world (your rock), you should have an swf with the mouse in it in the screen space and then, with any sort of screen2world function, you can "convert" the mouse coordinates in the screen space to an invisible ray (trace()) and retrieve the list of actors hits by the ray. You easily can find some example of this on this forum (search for trace() or screen2world...)
      Trying to have a swf in the world and moving your mouse in that space (the surface of the rock, if I understand) is certainly not the best way to do what you want.

      Anyway, I still can't capture the mouse down and up events...
      keep seeking a solution, thanks for the bump

      PS : what's the link with Oculus rift ?

      Comment

      Working...
      X