-
-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Description
https://ldtk.io/docs/game-dev/json-overview/making-your-dev-life-easier/
{ "__identifier" : "Mob", "__cx" : 3, "__cy" : 5, "defUid" : 2, "x" : 56, "y" : 96, "fieldInstances" : [] },...
Same goes for the grid based coordinates (
__cxand__cy) which normally depend on the Layer definition which contains the grid size making an overly complicated task for a simple info.
The actual JSON for this entity looks more like this:
{
"__identifier" : "Mob",
"__grid": [3, 5],
"defUid" : 2,
"px" : [56, 96],
"fieldInstances" : [],
"__worldX": 56,
"__worldY": 96,
},
This might be deliberate, since the relationship between x, y, __cx & __cy is a little more direct than px & __grid, and clearly illustrates what double underscore fields are for.
But it did make me second-guess my understanding for a moment or two when __cx wasn't in the search results in my own LDtk file.
(Similar references to x, y, __cx, & __cy on https://ldtk.io/docs/game-dev/json-overview/layer-instances/#entity-layer-instances)
Metadata
Metadata
Assignees
Labels
No labels