Jump to content

V2.12 Standard First_person_controller child position does not update.


photo

Recommended Posts

Hi,

When adding a dummy_node under the default first_person_controller the position does not automatically update.

To solve this I created a component to attach

using Unigine;

[Component(PropertyGuid = "cb0e1963a4eeaf66d7667f8d783a9b88e1a90947")]
public class set_world_partner : Component
{
	public String partner_name = "first_person_controller";
	private Node partner;
	private void Init()
	{
		partner = World.GetNodeByName(partner_name);
		node.SetWorldParent(partner);
	}
}

Am I missing something?

first_person_controller set_world_partner.PNG

Link to comment

Yes, then the parenting works.

I do want to keep my code separate and modular.
In the basic project it seems to have the same issue for all referenced nodes.

And after double-checking the following links.
https://developer.unigine.com/en/docs/2.12/objects/nodes/reference/?rlang=cs
https://developer.unigine.com/en/docs/2.12/editor2/instancing_nodes/?rlang=cs
The only thing that stands out is "place as node content" in video 3:06

So i think it should just work or it needs to be clarified in the docs.

Link to comment
×
×
  • Create New...