smartGL icon indicating copy to clipboard operation
smartGL copied to clipboard

onTouchEvent

Open schwarzen13 opened this issue 7 years ago • 3 comments

Hello, I'm currently trying to apply touch event to my 3d Object. How can I use onTouchEvent? thank you very much.

schwarzen13 avatar Oct 23 '17 02:10 schwarzen13

Hello,

at the moment the touch events are only 2D screen positions. This is planned to convert 2D <-> 3D position, but I can't tell you when it will be available.

See also https://github.com/smart-fun/smartGL/issues/10

smart-fun avatar Oct 23 '17 08:10 smart-fun

Hi @smart-fun , Im trying to apply simple touch event. How can I achieve this? Im doing like this:

@Override public void onTouchEvent(SmartGLView smartGLView, TouchHelperEvent event) { Log.d("TAG", "TOUCHED!"); }

but no touch logged.

dhemas avatar Nov 11 '17 02:11 dhemas

Hello dhemdhem,

simply set the clickable attribute of your SmartGLView to true.

android:clickable="true"

I should add this in the documentation...

Arnaud

smart-fun avatar Nov 12 '17 10:11 smart-fun