I am having a problem where I have the following objecst in a world3d:
Node3D: ( rotated in Y 90 degrees )
-> Several child nodes3D with diferent rotations and positions
I want to send the rotation and positions to another world3D ( an minimap )
Before I have rotation in the parent Node3D everything works normal, but when I add rotation to the node3D, for some reason the objects in the minimap world3d dont get its rotation and move, insted of from left to rign, to up and down.
I am sending the information to the new world as a signal, with the vectors :
signal Sig_UpdateMiniMap( objs_pos: Array[ TVector3 ] , obs_rot: Array[ TVector3 ] )
I am feeding it with this :
for node in get_tree().root.get_child(0).get_children():
if( utils.mySubstr(node.name,1,4)=="Obj_" ):
var carmesh: Node3D = node.get_node("ObjMesh")
pos:Vector3 = carmesh.transform.origin
rot:Vector3 = carmesh.global_transform.basis.get_euler()
arraypos.append( pos )
arrayrot.append( rot )
And setting in the minimap world3d with :
newobj.global_transform.basis.from_euler( obj.rot )
newobj.transform.origin = obj.pos
Nothing I tried worked... What I am doing wrong ?