Turn towards, but while touching the screen
-
I can get turn towards to work on a tap, but I want it work on a hold.
IE: the user taps and holds a point on the screen and I want an object to rotate towards it over say 1 second. Nothing happens until I stop touching and then it starts moving. Moving over 0 seconds is ok, just not what I want.
I have tried to do some crazy logic on move say 5 degrees left or right with a bunch of logic but quickly became unmanageable as the math to work out the logic is complicated.
Lee
-
There is a rotate to object behavior so an object will rotate to the target object and there is a feature where you can toggle speed to make the object rotate at a certain speed. :)
Hope this helps!
-
Hey, thanks so much for taking the time to respond. Yes - I have tried that, however while the screen is touched the object does not move- until I lift my finger off.
I move an object to where the user is touching, and then rotate the player to that object. Is there an order of events, or blocking thats going on?
-
That's odd.. Looks like a bug, but I don't know if that is intended or not...
Besides, I found out an another way to recreate what you said.
The turning is not instant, it takes a while for it to rotate a longer distance.
And it works on hold! :0
-
I think there may be a bug with this. @leewsimpson can you send an example project to us (contact@hyperpad.com) where it is only working after you lift off?
Thanks!
-
@Murtaza I think this happens to other behaviors with the speed function too...
-
@leewsimpson Could you show a screenshot of your behaviours?
-
@robinsonx said in Turn towards, but while touching the screen:
@Murtaza I think this happens to other behaviors with the speed function too...
From what @Hamed has told me, there is some extra code in place to interrupt behaviours like move so it doesn't do everything at the end. He mentioned that some behaviours may be missing this tweak. So if you have experienced this with others let us know and we'll try to add it for the next update.