Hi, I’m building augmented reality app (on Android) and I’m using jMonkey as my 3D engine.
I want to do simple thing. Move object from left side of screen to right (X axis) by changing the azimuth of view (I got it from compass).
I can calculate where the object is (rendered object has gps location) so I can say am I looking directly or maybe it is on the left or right. Now my problem is smooth move and calculate the change for local translation. My questions are:
- how can I calculate position in local translation for the object based on azimuth thay I have
- how make the change of local translation smooth. Now when I change the value from (for example) -4 to -1 the Spatial jumps. I would like to move it smoothly. I’ve tried to use Cinematic but either it is not for that or I’m not using it properly
About the calculating I’ve tried something like this
(objectAzimuth - azimuthWhereIlook) / offset
where offset is the scrope of X axis for example if my scope is <-20, 20> the offset is 40
(objectAzimuth - azimuthWhereIlook)
is a proper way of checking where the object is according to two azimuth (I have strong math for that and I’ve this is working. Based on that I know where the object is (directly, on left, on right).
So I have the point where the object should be on screen but I don’t know how to cast it on X axis