ejeinc / Meganekko

Gear VR Application Framework
http://www.meganekkovr.org/
Apache License 2.0
26 stars 10 forks source link

Scene.isLookingAt is wrong result if target has transform rotation or scaling #11

Closed niusounds closed 8 years ago

niusounds commented 8 years ago

Good (?)

<scene>
    <object
        id="@+id/obj"
        layout="@layout/hello_world"
        x="2.0"
        y="-2.5"
        z="-4.8" />
</scene>
SceneObject obj = getScene().findObjectById(R.id.obj);
getScene().isLookingAt(obj); // OK (?)

Bad

<scene>
    <object
        id="@+id/obj"
        layout="@layout/hello_world"
        rotation="30 -1 0 0"
        x="2.0"
        y="-2.5"
        z="-4.8" />
</scene>
SceneObject obj = getScene().findObjectById(R.id.obj);
getScene().isLookingAt(obj); // NG!!