armory3d / armory3d/armory

get object child returning an object that is not a child

Open
#2,962 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.3k
Forks
353
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Hi, the Get Object Child is inconsistent with the Get Object Children. Because the Get Object Child for the same name object returns the object even though is not a child. The Get Object Children does not do that, it only returns the children.
![image](https://github.com/armory3d/armory/assets/32546729/78d5b92c-818a-4d93-a65b-12744e01b823)
https://github.com/armory3d/iron/blob/8bf6b8fbf80bef6f12183413d1c23e2b9ccdeb5b/Sources/iron/object/Object.hx#L111

If it is right this way then that is needed in the documentation. Otherwise we need to adjust the code. Because get children does not do that so its misleading.

i open this issue to further discuss the options.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the linked Sources/iron/object/Object.hx around line 111 and compare the Get Object Child and Get Object Children behavior. Determine which child-matching semantics are intended, then confirm that the behavior is either aligned in code or explained in the documentation.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.