Questions tagged [hierarchy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
46 views

When/Where to use Node2d as parent vs Other Node

tl;dr = When/Where/Why use 'Node2d' as the parent vs going straight to 'Other Node'? I have just started diving into using Godot for the first time. I completed the Your First Game official tutorial (...
J Bloom's user avatar
  • 13
0 votes
1 answer
67 views

Parameter "current->parent" is null, don't see why

I'm using Godot for my current project, and it's been going great; but there's a bug I don't understand. I have a certain very simple script on my title screen: ...
Michael Macha's user avatar
0 votes
0 answers
233 views

Hierarchical relationships in an Entity Component System

I'm trying to figure out how to integrate entity component systems with scene graphs in a web game / application. The problem is of course that ECS and scene graphs are very different in nature. They ...
Candleout's user avatar
  • 101
1 vote
0 answers
89 views

What's the best way to store irregular areas of my map? (hierarchical pathfinding and grid segmentation)

This is for the development of a roguelike/management game. I'm trying to implement HPA (hierarchical pathfinding with A*), and I've found a few good resources (suggestions appreciated) in the forms ...
genfy's user avatar
  • 43
2 votes
1 answer
46 views

How to organize game entities that are stored inside other entities?

In my GPS based game, there are certain structures the players can build that store units. For example, airbase structures store aircraft objects. Currently, the way I have this organized is the ...
user204468's user avatar
1 vote
1 answer
69 views

Last hole artifact in screen space refection with Hierarchical Z

After lot of efforts I have an almost nice shader doing SSR with HiZ. The shader is provided below. Some parameters are tunable and you can speed up things but the difficulty in my scene (picture) are ...
philB's user avatar
  • 99
1 vote
3 answers
2k views

Best practice for getting references to specific child objects in Unity

When structuring the script to control a game object with several generations of children underneath, I gather from one of Jason Weimann's videos that it's a bad idea to use the string based methods ...
arcadeperfect's user avatar
-1 votes
2 answers
348 views

Parent object does not rotate on its own axis with its children. How do I fix it?

My parent object components: Rigidbody2D and the script I shared below. Children(Head, Body, Arm, Backpack...): There is only collider. There is no rigidbody2D. (I want the parent object to use the ...
gunza's user avatar
  • 13
0 votes
0 answers
120 views

How can I organize in Unity's hierarchy GameObjects that are spawned in a nested structure?

I'm wondering how I can organize instantiated GameObjects that are spawned in sort of a nested structure. I'm spawning these GameObjects via Containers, a set of ...
Ginger and Lavender's user avatar
0 votes
1 answer
158 views

Trying to access existing animator SetTrigger does nothing and returns error

First of all, I have a character with 2 armatures (Upper/Lower Body), where the Upper Body is the child of the Lower Body's root bone (Hip). This is intended, and I really don't want to touch the ...
505Legion's user avatar
  • 103
0 votes
0 answers
26 views

Move animation bones hierachy

I took an asset from the asset store with some animation. The animation expect the Animator to be put directly on the object that contains all the bones. => fbx (with animator) => bones I would ...
Bobby's user avatar
  • 21
0 votes
1 answer
1k views

How do I get a reference to a component on a sibling object in C# Script?

I'm working on a game, where the player dumps trash from Trash cans into a Trash Truck. These Trash cans have a random chance of having a Racoon on top of them. I have a script set up to detect when ...
Fox GAMING_NTF's user avatar
1 vote
1 answer
2k views

Difference between methods - onClick.AddListener and On Click under UI button inspector?

Within my Unity Project in my code, (see below), I have a button called Check which executes when CheckPress() function is called. I read two approaches by which this can be done. Appraoch 1: Using <...
Tanmayee Pathre's user avatar
0 votes
1 answer
74 views

Position/orient parent to place child at a particular position/orientation

I have a GameObject for which I know its world position and rotation. From another app, I receive a new rotation and position, which should represent the local position and rotation of my GameObject. ...
NoName123's user avatar
0 votes
1 answer
637 views

matrices and nesting hierarchy with game objects

Let's say we have some game objects and they are nested to form a tree: - A - B - C - D If each of those have a matrix for the scale, rotation and ...
clankill3r's user avatar
3 votes
1 answer
541 views

What does the Node2D transform property do?

Following a Godot tutorial I encountered the transform property, but I'm not sure what it means nor how to use it. I read the official Godot documentation, but it ...
EmmanCanVaz_95's user avatar
0 votes
1 answer
84 views

How can I apply UV mapping in parent space?

I'm trying to apply UV mapping in parent space - ie. taking into account the object's own transformation matrix but no matrices further up the transformation hierarchy. For example, I'd want to be ...
Danny Yaroslavski's user avatar
0 votes
2 answers
101 views

How to access specific child indices (directly, not using tags or searches)?

I have a game object whose prefab is structured a very specific way. It is a conveyor belt. I intend to arrange them end-to-end and animate them all at once using a script. Right now I am trying to ...
hatinacat2000's user avatar
-1 votes
2 answers
13k views

Looping through children in a foreach loop

I have a gameobject with a bunch of empty gameobjects as children that I want to use as spawn positions. I want to loop through each of these positions and have a certain amount of probability that ...
JoffLobster's user avatar
3 votes
0 answers
287 views

ASSIMP - Hierarchy Import

I'm, trying to wrap my head around assimp to import some files, including fbx/obj etc. Normally my experience tells me that I start at root node and then recursively load child nodes until I load the ...
Dariusz's user avatar
  • 133
1 vote
1 answer
974 views

Object scales strangely when setting y rotation after parenting

I created 3 boxes, then align the three to form some sort of a gate, I set the parent to an empty object so that I can easily move it. And I add box collider inside the gate. When I try to rotate it ...
otong's user avatar
  • 125
1 vote
1 answer
481 views

Efficiently calculate 2d world position based on parent(s) recursively

I am writing a small 2d html5 game engine in javascript that relies on the concept of a hierarchy. The scene is the root node or entity, and its children make up the game objects. These children can ...
clabe45's user avatar
  • 408
0 votes
2 answers
791 views

Is it more efficient to add scripts to each GameObject or to a single parent object?

Does a C# script added to a parent object work more efficiently and effectively (in terms of both memory and performance) on all objects, in my case lighting, or adding script components to each ...
Mark Henderson's user avatar
1 vote
1 answer
373 views

Add picture in the Hierarchy view in Unity

How can I add a picture in the Hierarchy view in Unity? For example, Dragon bones does it automatically. Here it is : As you can see there is a picture on the right of the gameObject name.
cutMeDown's user avatar
  • 107
1 vote
1 answer
539 views

LIBGDX - group as child of an actor?

I've looked in forums, the doc, and the code, and I'm thinking this isn't currently possible, but maybe I'm missing something, so just to be sure: is there a way to set a group as child of and actor? ...
ontheway's user avatar
0 votes
1 answer
1k views

Unity, Detect the last GameObject in the hierarchy of a given list of GameObjects

I have a list of GameObject , and I need to know which one is the last in the hierarchy ( This is for a UI system, So is kind of 'which one is showing up') I have a cursor managed by GamePad , and I ...
D4rWiNS's user avatar
  • 293
0 votes
1 answer
302 views

Supporting uniform/non-uniform scale in hierarchical animation

I have worked with hierarchical blended animation systems for a number of years, but I have never been quite sure how to handle scale correctly. The introduction of non-uniform scale is additionally ...
Steven's user avatar
  • 3,052
4 votes
1 answer
9k views

Object scaling when parenting by script

How do I make it so an object doesn't scale with another object that I parented it with by script? If anyone knows how to get around this I would really appreciate it. This is the part of the script ...
Signekatt's user avatar