K
K
Kruger2018-07-19 15:35:06
Android
Kruger, 2018-07-19 15:35:06

How to move objects in openGL?

Based on the code presented in the start android course, how can you use the public void setModelMatrix() {Matrix.translateM(mModelMatrix, 0, x, y, 0);} function to move objects after they are created. That is, I created an object, and I want to move it when I click on the button, how can I do this, and it is necessary that the object itself be redrawn, and not deleted and a new one created with new coordinates.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
key don, 2018-07-19
@KrUgerD

Chz as in your start android, but in general, each frame when redrawing the object is "deleted" and created with "new" coordinates.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question