- Home /
Touch and Drag 3D Objects on a Grid (for Android)
I am looking for a simple java example of moving objects on a grid. I am new to Unity and Java so I am looking for some complete examples to learn from.
I would like to do the following but don't know how.
Set up a grid of coordinates (like a chess board). Using an array?
Select an object by touching it on the screen. - Ray cast?
Move the object in 1 of 4 directions by dragging my finger. Detect movement direction on a grid?
Snap the object to the next grid location.
Update the array with the objects new position.
Help on any part of these questions would be appreciated. I have search for clear examples without success.
Please, these are all pretty big questions. Can you split it up into 5 different question which can be answered separately?
Also, javascript, not java. If you like java and want to code in java, use C#- it's basically microsoft's ripoff of java anyway...
Your answer
Follow this Question
Related Questions
Building a Chessboard 2 Answers
Checker Board Grid 0 Answers
[Long Post] Constant linear movement in a 2d array grid with auto-turning on detecting a wall 1 Answer
Creating a 2D Movement Grid 0 Answers
Problem with raycast detection? 1 Answer