Open balintbarna opened 2 years ago
@balintmaci Please upload a minimal reproduction project to make this easier to troubleshoot.
@Calinou https://github.com/balintmaci/Godot-Remote-Transform-Debug-Project Please see README for more info.
I made a mistake in the original ticket, I just realized that scoop has not gotten the 3.4.2 binaries yet, so I'm still on 3.4.1.
@Calinou also here's my homegrown PullTransform class (as opposed to RemoteTransform which pushes its transform), which seems to work correctly in this scenario, although I have not tested it in other scenarios. https://github.com/balintmaci/VR-Demo/blob/restructure_vr_player_scene/general/PullTransform.gd
Godot version
3.4.1 stable
System information
Windows 11
Issue description
I have the equivalent of the following node tree setup:
In the test scenario, the child's rotation is
0,0,0
; the remote's rotation is also0,0,0
inlocal
space.Body
gets rotated based on mouse movement. In the real scenario,child
also gets rotated byparent_orientation_setter
which calculates a global space orientation based on the current state of ARVR nodes (it guesses player orientation based on HMD orientation and the relative positions of the controllers). I wantremote
to give its global orientation, which is the assumed orientation of the physical player, to thetarget
node. Thetarget
node will use its own orientation to move its parent,body
, based on its own forward and right directions. This is needed, because in VR the physical orientation of the player can differ from the VR root's, and therefore the root body's orientation, and delegating responsibilities to separate nodes makes the code nice, hence having a mover node, which is calledtarget
in the example.Now the bug seems to be that the local orientation of my target equals the global orientation of my remote. This seems like unexpected behavior for me, as I'd expect it to be either local-to-local or global-to-global. In the example I mentioned above, I used the Remote scene tree to debug the scene.
body
has a local rotation of0,-36.5,0
;child
has a ZERO local rotation,remote
has a ZERO local rotation,remote
is set to global and rotation only, andtarget
has a local rotation of0,-36.5,0
, making its global rotation twice as much as that of the remote's. I don't think it makes a difference, butchild
has a scale of0.912
on the Y axis.Steps to reproduce
Create a scene as described above and rotate your root body around.
Minimal reproduction project
No response