Sprite randomly larger than it should be

The small sprites are how they should be. These are being spawned via a factory when a bullet hits the wall block.

The sprite’s GO is just a GO with the sprite nothing else.

The spawning code is

factory.create("/hit_marker#factory", message.position)

I did increase the max sprite count to 2056 but I don’t think that limit was hit before this happened.

Have not had it reproduce yet.

1 Like

Happened again, this time with a bullet, didn’t screenshot it though…

When I was testing this one of the bullets was much larger. It seems rare.

Actually with these bullets at least it might be explainable because it’s still using old direction code, but the other sprite has no explanation as far as what I’m doing.

I guess you already thought of it but a created object from factory inherits the caller’s current scale if not specified. But it seems like you don’t seem to scale anything like that?

2 Likes

No, although there is still the bug with the vmath.quat_from_to with near opposite directions causing sprites to scale up, which may explain why a one of the hit markers inherited it. Before I had bullets moving much faster so I may have not noticed the bullet was larger too, so that makes sense then for the first situation if the hit market inhereted a random large scale of a bullet because it was at exact angle required to make it bug with vmath.quat_from_to. I’ll switch the bullets to quat_rotation_z now.

Now that I think about it in both cases my character was aiming to the left so that’s probably the case. Buggy vmath.quat_from_to

2 Likes