Log in or register to post comments

teapot touch events

June 16, 2016 - 9:36pm #1

Hi,

    I have run the sample of vuforia I am not using c++ I am just using java for android. I want to to apply touch events in java how can I rotate teapot and grab accordingly in java?? Before I have found the code in the forum but that is in C++ and it is not working I put it in java file.  I do not have ImageTargets.cpp, I have ImageTargets.java. Please guide me how can I do that thanks

teapot touch events

June 22, 2016 - 1:38am #2

This guide provides some useful explanation of how to handle touch events in Android, with an OpenGL view:

https://developer.android.com/training/graphics/opengl/touch.html

 

To rotate (or else translate) the teapot (or other 3D model), you need to add your rotation/translation components to the modelview matrix (see the sample code in ImageTargetsRenderer.java, check the render() method and you'll find code to set rotation, scaling and translations in the teapot modelview matrix)

 

Log in or register to post comments