aspose file tools*
The moose likes Game Development and the fly likes Please help me implement in Libgdx a way to move my character to where I touch Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "Please help me implement in Libgdx a way to move my character to where I touch" Watch "Please help me implement in Libgdx a way to move my character to where I touch" New topic
Author

Please help me implement in Libgdx a way to move my character to where I touch

john hog
Greenhorn

Joined: Nov 25, 2013
Posts: 10
How do I move my character from his current location towards where I touch? I have tried the vector2 method for lerping and it just worked out really weird. What is the math / formula/ logic??

I have tried obtaining the angle between both points and multiplying them by my acceleration and speed but nothing seemed to work correctly. I googled and tried a few formulas provided but none of them made my player move to where I want. Like my character can move but not where I click, its almost kind of random. Please help, been at this for a long time and other websites have not been very useful, my game is already published but people have complained of controls so I want to implement the move to where I touch instead of a touch drag movement I used

here is the last thing I tried



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please help me implement in Libgdx a way to move my character to where I touch