Hello,
How can I make an object move while my nifty gui button is pressed?
I already tried the interaction using the
<interaction onClickRepeat = "move()">
but my movement seems to move in chunks.
How can I do it in a smooth movement??
Hello,
How can I make an object move while my nifty gui button is pressed?
I already tried the interaction using the
<interaction onClickRepeat = "move()">
but my movement seems to move in chunks.
How can I do it in a smooth movement??
I recommend you to use the onClick
so you start the movement (just put a boolean to true, ie: move = true
) and use the onRelease
to end the movement (ie: move = false
).
With that and any update loop you can achieve a smooth movement (remember to use the tpf to get it smoothly).
It worked.
Thanks mannn
Do you know if theres any other way to do it using threads?
I think it’s the good way
You can’t modify the scenegraph on another thread than the main one.