armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.07k stars 315 forks source link

Clear Parent Inverse - camera view does not match #763

Open C-dS-R opened 6 years ago

C-dS-R commented 6 years ago

Tried to follow this tutorial: http://forums.armory3d.org/t/logic-nodes-tutorial-for-simple-fps-controller/598 and the view looks strange when I press F5

My scene:

1

The view:

2

myscene.zip

FuriouZz commented 6 years ago

https://github.com/armory3d/armory/blob/master/blender/arm/exporter.py#L486

o['transform']['values'] = self.write_matrix(bobject.matrix_basis) seems to fix the problem.

https://docs.blender.org/api/blender_python_api_2_74_release/bpy.types.Object.html?highlight=object#bpy.types.Object.matrix_basis

https://blender.stackexchange.com/questions/35125/what-is-matrix-basis matrix_local = matrix_parent_inverse * matrix_basis