I have displayed the 3D object on screen using markerless. Now, I want to rotate and move the ARNode on screen using finger gestures?
Asked
Active
Viewed 184 times
1 Answers
0
you can use onScroll()
event of gestureDetect and change scale of model Node
@Override
public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent1, float v, float v1)
{
float x =0;
if (v > 0)
{
x= -Math.abs(v);
x = (float) (x*0.25);
}
else
{
x= Math.abs(v);
x = (float) (x*0.25);
}
if (v != 0 && (arbiTrack.getIsTracking()))
{
modelNode.rotateByDegrees(x,0,1,0);
Log.e("canRotate: ",modelNode.getVisible()+"");
}
return true;
}

ND1010_
- 3,743
- 24
- 41