Open ghost opened 4 years ago
in what map is the npc used?
I can't find the map with bunny in it, but it also breaks for "crossovers.turing" map: "rookie-harbor.test"
These rely on animSheet.SUB entries
Maybe because of this line? https://github.com/CCDirectLink/crosscode-map-editor/blob/673bfbb766fd48b4ffa61742fab64536ee42e928/webapp/src/app/shared/phaser/entities/registry/npc.ts#L175
if sheet.offX
is 0 it is not used because it evaluates to falsy
Possibly. I need to check
Maybe because of this line?
if
sheet.offX
is 0 it is not used because it evaluates to falsy
It's not because of this. The hardcoded NPCSimple
is used to offset the frames, but the npc crossovers.turing
only has one frame so the offset is wrong.
I don't really know how to fix it, or in general how the npc's get their sprites
I have noticed this too, it seems to be quite widespread. NPCs rendered in the map editor are always slightly off from their positions in-game. Here is an example comparing the map editor (first image) versus in-game (second image), note the position of the character's feet compared to the floor pattern:
It's not always the same offset however. Here is another example. First image is map editor, second image is in-game:
The first example was higher in-game and the second example was lower in-game. It seems to be different for different NPCs, their "config" setting in the NpcState, and perhaps their "face" setting.
This is a minor annoyance that makes it impossible to be pixel-perfect while placing NPCs. I also like to position NPCs around in the editor temporarily to note coordinates for navigation waypoints, and this means those will always be slightly off.
NPC: "crossovers.bunny"
Calculated sheets.fix[0].x position should be 0 but is 32.