drag an actor anywhere
I'm trying to make an actor follow and drag anywhere at the screen but I don't seem to be successful with it. It jumps choppily and I only can click along the actor size. I have the file here, can somebody tell me what's wrong with it?
Artist/Game Developer / Animator at your service..
Best Answers
-
KevinCross London, UKPosts: 1,894
Try interpolate:
Rule (Any): If touch is inside or touch is outside
Interpolate: self.Position.X To game.Mouse.Position.X (change duration for speed)
Interpolate: self.Position.Y To game.Mouse.Position.Y (change duration for speed) -
KevinCross London, UKPosts: 1,894
You'll find that with Interpolate it's the duration it takes to get from point A to B, and not the speed, so small movements will take the same amount of time as long movements, but it will travel faster for longer movements as it's got more ground to cover in the selected duration. You could get fancy and calculate the distance and adjust the duration accordingly but you may find it fine as is.
If you can get "Move To" working that might be a better option as that uses speed. -
KevinCross London, UKPosts: 1,894
You have to keep in mind that with "Move To", or "Interpolate" you can no longer drag the actor. Constrain is the best way to drag the actor. It drags reasonably smooth without any major jumps.
Answers
Artist/Game Developer / Animator at your service..
Artist/Game Developer / Animator at your service..
Artist/Game Developer / Animator at your service..
Artist/Game Developer / Animator at your service..
thanks @jaime_c @KevinCross great help
Artist/Game Developer / Animator at your service..