We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Need to deactivate keyboard while append scene

Home Forums Puzzles Need to deactivate keyboard while append scene

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #86505
    NaxosCG
    Customer

    Hellto there !

    I’m working on a new project where i’ll have to append scenes containing letters.

    So, for ex, when i press ‘A’, it appends “A100.gltf.xz” to the scene, then move it regarless of the number of letters.

    It works, but if i am too fast typing letters, the move / offset is not fast enough and letters are no longer beside to each other, but at the same place…

    A solution i would like to test is to decativate keyboard while append + move, then activate it back.
    Is that possible ?

    "1+1=3... for large values of 1"

    #86506
    xeon
    Customer

    sounds like you could just use a variable. Lets call it “movedone”… it would by default be true and false if the move action is taking place.

    Your on event key down listner would have logic. If “movedone” is true… then next key
    If “movedone” is false…then ignore keyboard input.

    The down side to this is that someone typing fast will have to wait for the move to be done…so you may want a visual indicator of some type to alert the user input can be done.

    Otherwise you may want to create a key capture lost..and then execute the key strokes based on the key list after each “movedone”.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #86523
    NaxosCG
    Customer

    Thank you, i’ve done that, and it works…
    If the user wants to type too fast, he will have to slow down ;-)

    "1+1=3... for large values of 1"

    #86620
    visualizer
    Participant

    Can you share a screenshot of working this “movedone” thing?

    Where we get that Ignore keyboard input puzzle?

    • This reply was modified 1 month, 2 weeks ago by visualizer.
    #86624
    NaxosCG
    Customer

    I’ve set a “IsAppending” variable set to false, then set to true when appending scene and stuff, then back to false at the end.

    And the keyboard event has an “if IsAppending false” before doing anything

    "1+1=3... for large values of 1"

    #86721
    visualizer
    Participant

    Oh ok
    I will try it

    #86728
    NaxosCG
    Customer

    Oh ok
    I will try it

    Sorry, i can’t really share screenshot as it is spread around multiple puzzles, but quite simple in fact

    "1+1=3... for large values of 1"

    #86731
    xeon
    Customer

    Here is an example around a key control using a flag variable.

    demo – https://v3d.net/1eh2
    project zip file: https://v3d.net/1eh2

    Press the 7 key or 8 key. Hold 7 for 2 seconds and let go… hold 8 key for 2 second and let go and notice the difference in playback. The variable is controlling the state of the animation based on key press and hold time.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #86733
    NaxosCG
    Customer

    Many thanks !

    "1+1=3... for large values of 1"

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.