Repository: godot
Issue: Physics Error 3D (RigidBody): Condition "Math::is_nan(v.x)" is true/"Math::is_inf(v.x)" is true.
Labels: bug,topic:physics,topic:3d

### Godot version

3.4

### System information

Windows 10, does not appear graphics related but NVIDEA GeForce GTX 1060 6GB, (GLES2, and GLES3 as far as I know)

### Issue description

Note: Error appears similar to:   #50450, #32611 (though the circumstances getting to the error seem to differ, so i'm unsure if it's a duplicate)

For larger projects run from the Godot editor this problem has causes me a crash of the Godot project itself (but NOT the editor). The message spams in console for a second, followed by windows problem reporting popping up (followed by windows problem reporting itself stopping working).

Appears to occur when rigid bodies are spawned already intersecting with each other (this could just be terrible practice on my part).
For smaller projects, as discovered when making the reproduction project, it never causes a crash, but still spams the console with the Math::is_nan error until the offending collision object (rigid body) is removed from the scene. I say rigid body only because thats the one I used, don't know about other physics bodies.

When running the project through the 3.4 editor, the error is a Math::is_nan(v.x) error, but when debugged via visual studio, the error is a Math::is_inf(v.x) error.

Another difference with visual studio and the Godot editor is when run via the editor, larger projects crash, while larger projects run via visual studio exhibit the same behaviour as smaller projects, spamming the error in console until the offending object is removed (but without crashing).

Here is the error in full:
ERROR: Condition "Math::is_nan(v.x)" is true.
   at: instance_set_transform (servers/visual/visual_server_scene.cpp:691)

(and for visual studio with the code from https://github.com/godotengine/godot/tree/3.4-stable ):
ERROR: Condition "Math::is_inf(v.x)" is true.
   at: instance_set_transform (servers/visual/visual_server_scene.cpp:690)


Not sure if it is helpful, but here is the call stack from visual studio when the error is thrown (using Godot 3.4 source code taken from 
https://github.com/godotengine/godot/tree/3.4-stable 
with scons vsproj):

>	godot.windows.tools.32.exe!VisualServerScene::instance_set_transform(RID p_instance, const Transform & p_transform) Line 690	C++
 	godot.windows.tools.32.exe!VisualServerRaster::instance_set_transform(RID arg1, const Transform & arg2) Line 548	C++
 	godot.windows.tools.32.exe!VisualServerWrapMT::instance_set_transform(RID p1, const Transform & p2) Line 471	C++
 	godot.windows.tools.32.exe!VisualInstance::_notification(int p_what) Line 87	C++
 	godot.windows.tools.32.exe!VisualInstance::_notificationv(int p_notification, bool p_reversed) Line 40	C++
 	godot.windows.tools.32.exe!GeometryInstance::_notificationv(int p_notification, bool p_reversed) Line 83	C++
 	godot.windows.tools.32.exe!MeshInstance::_notificationv(int p_notification, bool p_reversed) Line 42	C++
 	godot.windows.tools.32.exe!Object::notification(int p_notification, bool p_reversed) Line 929	C++
 	godot.windows.tools.32.exe!SceneTree::flush_transform_notifications() Line 159	C++
 	godot.windows.tools.32.exe!SceneTree::idle(float p_time) Line 541	C++
 	godot.windows.tools.32.exe!Main::iteration() Line 2188	C++
 	godot.windows.tools.32.exe!OS_Windows::run() Line 3342	C++
 	godot.windows.tools.32.exe!widechar_main(int argc, wchar_t * * argv) Line 161	C++
 	godot.windows.tools.32.exe!_main() Line 183	C++
 	godot.windows.tools.32.exe!main(int _argc, char * * _argv) Line 195	C++
 	[External Code]	
 	kernel32.dll![Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]	Unknown


### Steps to reproduce

 I have found this 22.9KB project is reliable at getting the error quickly, but ultimately I have found this error is hard to predict, showing up from a few seconds to a few minutes after starting (and this project does not crash. I'm unsure what difference causes the crash in larger projects).

The project is a simple FPS, pan the camera around with mouse movement and click and hold left click to fire projectiles. Keep doing this, with the camera preferably facing upwards (shifting the camera 180 degrees up and down can help).

within the span of a few seconds to a few minutes you should get the error. 
ERROR: Condition "Math::is_nan(v.x)" is true. 
or
ERROR: Condition "Math::is_inf(v.x)" is true. 
if debugging via visual studio.

A visual indication of the bug in game will be the 2 or more colliding projectiles that I have to assume cause the bug floating in the air, unresponsive to collisions.

Press the 'R' key and the scene will reset, removing the offending rigid bodies.

### Minimal reproduction project

[NANbowminireproducedproject.zip](https://github.com/godotengine/godot/files/7622172/NANbowminireproducedproject.zip)