Set actor location fails

Hi Guys,

I have a weird issue here. I have an actor which is supposed to follow the location of my mouse when I hold mouse key down. It works perfectly when I check in the editor preview but when I tested it on an android tablet whenever I lifted my finger off the screen instead of stop following it relocated to 0,0,0.

Could anyone help me with this issue please?

Thanks

Try adding a branch in the part that makes the actor folloe the mouse or touch, which looks at whether the touch or nutton press is still down (can be set with a boolean in the touch, press, release, and in touch events) and only update location if it is still being touched. Maybe check the location first instead and if it is 0,0,0 then don’t set location.