godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.92k stars 21.06k forks source link

Camera doesn't Work/Render when it is child of a Rigidbody #9965

Closed Corruptinator closed 7 years ago

Corruptinator commented 7 years ago

Operating system or device - Godot version: Godot 3.0 Alpha, Windows 10, Wacom Cintiq Companion 2

Issue description:

When I was attempting to make a 3D racetrack demo using PBR, I parented the camera into a 3D rigidbody node to allow the camera to follow the rigidbody vehicle, but when I started to test out the level by playing the scene, the camera doesn't render the scene correctly or does not show anything at all. I have no idea on how this is happening but unfortunately the camera immediately breaks when parenting in a rigidbody. It also generates errors in the debug area:

0:00:10:0919 - Condition ' determinant() == 0 ' is true 0:00:10:0919 - Condition ' p_axis.is_normalized() == false ' is true and 0:00:11:0022 - Condition ' det == 0' is true

Steps to reproduce:

Try parenting by click and dragging the camera node to the rigidbody node to see if the results are the same or not based on what I've encountered so far.

eon-s commented 7 years ago

I can't reproduce, can you make a small example with the error?

Corruptinator commented 7 years ago

I'm currently rendering out an example using a screen capture.

Corruptinator commented 7 years ago

Here is an unlisted youtube link showing what is happening. For some reason when I do make the camera a child of a normal rigidbody with a normal mesh, it works fine. Where it breaks is when I imported the model from Blender using the Better Collada Exporter:

https://youtu.be/6sTjxIb7_uA

Corruptinator commented 7 years ago

One time it just wouldn't render at all, but now it just causes the camera to zoom in even when I haven't changed any camera settings. Somehow when exported from Blender, the rigidbody parenting setup is causing the camera not to work right.

Bottom line: Not all nodes are capable of making the camera node work right. There should be a way to preserve the camera setting and rendering to make sure nothing like what is shown in the video link happens.

P.S. Hope I'm not causing too much confusion. I just encounter bugs sometimes and it gets complex in explaining what is happening

eon-s commented 7 years ago

A bit of confussion in my poor english xD But check the scales of imported elements, the ' det == 0' usually refers to a problem with a Transform matrix determinant, look at the scales while running (remote inspector) too.

Corruptinator commented 7 years ago

Ok, I'll check it out.

reduz commented 7 years ago

i cant really say there is enough information on this report to make an idea of what is going on. A short example project would be great.

reduz commented 7 years ago

closing unless an example project is submitted, I just cant figure it out from the information provided