This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I am working on a simple space combat game and am trying to use two viewports to set up an X-Wing style front and back radar display. I am trying to set the camera to follow a Position3D node that is attached to the player craft (called "Striker"). However, when I used the code

onready var front_radar_position : Node = get_node("/root/Main/Striker/radarFrontPosition")

onready var front_radar : Node = get_node("/root/Main/HUD/ViewportContainer/Viewport/radarFront")

func _process(delta):
front_radar.global_transform.orgin = front_radar_position.global_transform.origin

I get an "Invalid set Index 'origin' (on base: 'Transform' with value of type 'Vector3' error. It also doesn't matter if I place the code in the Main scene and reference the children from that script. I still receive the same error.

Any help you could give would be greatly appreciated. Thank you!

Godot version v3.3.2
in Engine by (12 points)

1 Answer

+1 vote

You misspelled origin.

by (46 points)

You have got to be kidding me. Wow, well, that did the trick. Thank you so much for noticing and replying. Can’t believe I missed that!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.