WheelCollider.GetWorldPose returns 0
Varneon
I am trying to get the wheel meshes to align with wheel colliders on a vehicle by using WheelCollider.GetWorldPose, but in every situation it returns both Vector3( 0.0, 0.0, 0.0 ) and Quaternion( 0.0, 0.0, 0.0, 0.0 ) and the wheels get thrown into the center of the world.
I have tried recreating this issue in 3 different Unity projects with both Udon Graph and UdonSharp, always with same results, native C# scripts work without any issues.
Edit: I have had the same issue ever since the launch of Udon Open Alpha, so it is not SDK version specific.
Log In
Varneon
This has been fixed in VRChat 2020.3.1 [956]
Lamp
Still broken. I tested this in both Unity (VRCSDK3 2020.04.25.12.49) and VRChat (2020.1.1p5, build 924) and the Vector3 and Quaternion variables are not being updated by the WheelCollider.GetWorldPose extern from the initialized values, no errors are being thrown.
D
Deksaebtnac
Allegedly this is fixed:
See the comments in:
D
Deksaebtnac
This can be reproduced with only 5 nodes:
Declare 2 variables, for types WheelCollider and Vector 3
(Any Event) ---> (Wheel Collider Get World Pose) ---> (Set Variable)
This stops the program from being able to refresh.
Extra information given via console:
Failed to refresh program 'CarUdonGraph' due to exception 'System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <e1319b7195c343e79b385cd3aa43f5dc>:0
at VRC.Udon.Compiler.Compilers.UdonGraphCompiler.CompileNode (VRC.Udon.Graph.UdonNodeData node, VRC.Udon.Compiler.Compilers.UdonGraphCompiler+CompilerState state, System.String returnName, System.Int32 otherIndex) [0x014d5] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0
at VRC.Udon.Compiler.Compilers.UdonGraphCompiler.CompileNode (VRC.Udon.Graph.UdonNodeData node, VRC.Udon.Compiler.Compilers.UdonGraphCompiler+CompilerState state, System.String returnName, System.Int32 otherIndex) [0x002fe] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0
at VRC.Udon.Compiler.Compilers.UdonGraphCompiler.CompileNode (VRC.Udon.Graph.UdonNodeData node, VRC.Udon.Compiler.Compilers.UdonGraphCompiler+CompilerState state, System.String returnName, System.Int32 otherIndex) [0x015a3] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0
at VRC.Udon.Compiler.Compilers.UdonGraphCompiler.<GraphCompiler>g__CompileEventNodesForGraph|5_0 (VRC.Udon.Graph.UdonGraphData udonGraphData, VRC.Udon.Compiler.Compilers.UdonGraphCompiler+CompilerState compilerState, System.Collections.Generic.Dictionary`2[TKey,TValue] dictionary, VRC.Udon.Compiler.Compilers.UdonGraphCompiler+<>c__DisplayClass5_0& ) [0x00068] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0
at VRC.Udon.Compiler.Compilers.UdonGraphCompiler.GraphCompiler (VRC.Udon.Graph.UdonGraphData data, VRC.Udon.Graph.Interfaces.INodeRegistry nodeRegistry, System.Collections.Generic.Dictionary
2[System.String,System.ValueTuple
3[System.String,System.String,System.Int32]]& linkedSymbols, System.Collections.Generic.Dictionary2[System.String,System.ValueTuple
2[System.Object,System.Type]]& heapDefaultValues) [0x00144] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0 at VRC.Udon.Compiler.Compilers.UdonGraphCompiler.Compile (VRC.Udon.Graph.UdonGraphData graph, VRC.Udon.Graph.Interfaces.INodeRegistry nodeRegistry, System.Collections.Generic.Dictionary
2[System.String,System.ValueTuple
3[System.String,System.String,System.Int32]]& linkedSymbols, System.Collections.Generic.Dictionary2[System.String,System.ValueTuple
2[System.Object,System.Type]]& heapDefaultValues) [0x00000] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0 at VRC.Udon.Compiler.UdonGraphCompilerDispatcher.CompileGraph (VRC.Udon.Graph.Interfaces.IUdonCompilableGraph graph, VRC.Udon.Graph.Interfaces.INodeRegistry nodeRegistry, System.Collections.Generic.Dictionary
2[System.String,System.ValueTuple
3[System.String,System.String,System.Int32]]& linkedSymbols, System.Collections.Generic.Dictionary2[System.String,System.ValueTuple
2[System.Object,System.Type]]& heapDefaultValues) [0x00016] in <ce7bc89dc03f47edb44c3bec35eb22e9>:0 at VRC.Udon.EditorBindings.UdonEditorInterface.CompileGraph (VRC.Udon.Graph.Interfaces.IUdonCompilableGraph graph, VRC.Udon.Graph.Interfaces.INodeRegistry nodeRegistry, System.Collections.Generic.Dictionary
2[System.String,System.ValueTuple
3[System.String,System.String,System.Int32]]& linkedSymbols, System.Collections.Generic.Dictionary2[System.String,System.ValueTuple
2[System.Object,System.Type]]& heapDefaultValues) [0x00000] in <a9f3771b6816485fb41379ce9c1cba74>:0 at VRC.Udon.Editor.UdonEditorManager.CompileGraph (VRC.Udon.Graph.Interfaces.IUdonCompilableGraph graph, VRC.Udon.Graph.Interfaces.INodeRegistry nodeRegistry, System.Collections.Generic.Dictionary
2[System.String,System.ValueTuple
3[System.String,System.String,System.Int32]]& linkedSymbols, System.Collections.Generic.Dictionary2[System.String,System.ValueTuple
2[System.Object,System.Type]]& heapDefaultValues) [0x00001] in D:\Projects\VRCmod\Unity\VRC_SDK3\Assets\Udon\Editor\UdonEditorManager.cs:331 at VRC.Udon.Editor.ProgramSources.UdonGraphProgramAsset.CompileGraph () [0x00001] in D:\Projects\VRCmod\Unity\VRC_SDK3\Assets\Udon\Editor\ProgramSources\UdonGraph\UdonGraphProgramAsset.cs:76
at VRC.Udon.Editor.ProgramSources.UdonGraphProgramAsset.RefreshProgramImpl () [0x00011] in D:\Projects\VRCmod\Unity\VRC_SDK3\Assets\Udon\Editor\ProgramSources\UdonGraph\UdonGraphProgramAsset.cs:48
at VRC.Udon.Editor.ProgramSources.UdonProgramAsset.RefreshProgram () [0x0000d] in D:\Projects\VRCmod\Unity\VRC_SDK3\Assets\Udon\Editor\ProgramSources\UdonProgram\UdonProgramAsset.cs:104
at VRC.Udon.Editor.UdonEditorManager.RefreshQueuedProgramSources () [0x00029] in D:\Projects\VRCmod\Unity\VRC_SDK3\Assets\Udon\Editor\UdonEditorManager.cs:129 '.
UnityEngine.Debug:LogError(Object)
VRC.Udon.Editor.UdonEditorManager:RefreshQueuedProgramSources() (at Assets/Udon/Editor/UdonEditorManager.cs:133)
VRC.Udon.Editor.ProgramSources.UdonGraphWindow:DrawToolbar() (at Assets/Udon/Editor/ProgramSources/UdonGraph/UdonGraphWindow.cs:211)
VRC.Udon.Editor.ProgramSources.UdonGraphWindow:OnGUI() (at Assets/Udon/Editor/ProgramSources/UdonGraph/UdonGraphWindow.cs:142)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)