Attached objects are seriously off-centered (solved?)

Test version
Flowlab - Customization test


I don’t want to post the game link because its a surprise test game I plan on sharing later, but for some reason all my attached objects go off center. This first happened in Halo: Flowlab Evolved Multiplayer, but I didn’t think too much of it. Now, it’s happening again in my latest fan project (also Halo-related coincidentally) and its seriously bothering me.

The effect is most easily noticeable with chest attachments and while using the resize feature. it is very easy to reproduce because it happens every time I attach something in these two games. The sole exception are the weapons, which attach fine, but any visors or other cosmetics just misalign.

It’s probably because the sprite is trying to attach to the CENTER of the object. And the sprite is not a square probably, so its center is misaligned. Could be wrong, but I thought I saw someone else having problems with things aligning and something like this was the cause.

2 Likes

I see. Well, the sprite does look like this:
image


So its not exactly a square.

I’m not very familiar with the Attach behavior so you would have to ask someone else how to fix this

image


@glowbug @JR01
Could you help me with this? I’m not sure if this is a behavior/code problem or an art problem.

1 Like

The attach behaviour spawns an object in the middle of it. It could be off-center if a sprite is not in the middle of the canvas or has a hitbox of inaccuracy (oval sprite using square).

1 Like

Would this count?
image

1 Like

I think it would, but I’m not 100% sure.

1 Like

Ok

1 Like

The center of the sprite attaches to the center of the object.
To make adjustments, you can adjust the art or use code to make your own offsets.
By using Always → number → +x or +y position.

Offsets are planned to be added for Attach, Emit and Raycast but it may be a little while.

2 Likes

Ok. I’ll post a test version.
Flowlab - Customization test

1 Like

Thank you all! I just moved the sprites a bit to the right and it was fixed.

1 Like