Offset issue

I’ve pretty much already isolated the issue, I just don’t understand why it’s now an issue



this is the chasecam offset I used for my character node before I updated jme3 and fixed my test classes to work correctly with the new physics changes.

[java]chaseCam.setLookAtOffset(new Vector3f(0,model.getLocalTranslation().y+model.getLocalScale().y/+terrain.getHeight(new Vector2f(cam.getLocation().x,cam.getLocation().y))/+1.5f*/,0));[/java]



the problem is that the commented out portion now places the chasecam miles above the character, whereas it used to be just around head height …curious as to why that is ???

edit



um this below seems to work I also moved it from setupChaseCamrea to simpleUpdate… still curious as to what went bad though

[java]chaseCam.setLookAtOffset(new Vector3f(0,model.getLocalScale().y+terrain.getHeight(new Vector2f(cam.getLocation().x,cam.getLocation().y))+1.5f,0));[/java]

yeah there is an issue with the offset of the cam, i need to look closer into it.

nehon said:
yeah there is an issue with the offset of the cam, i need to look closer into it.


I realized that, I'm uncertain as to whether its it originating from the chasecam class though if you remember, some time ago I had mentioned changes I made to a copy of chasecam...............I still use my adjusted version and after looking a little closer it seems that [java]model.getLocalTranslation.y[/java] is actually where the problem was in my offset, even if I placed the the code in the first post in simpleUpdate as opposed to setupChaseCam() I got the offset issues