Scaling issue with factory generated bullets

Hi!

I am in the process of making a shooter game and I encountered an issue with the scale of bullets being fired by the character, they are either very stretched out or very small, while they all are generated with the same script and same sprite.
https://i.gyazo.com/8f98dc79c3858ccada09c45352cc6f1b.gif

this is my script:

local plrpos = go.get_position(“char”)
local b = factory.create("#Glaser",vmath.vector3(plrpos.x,plrpos.y+31.5,-0.5), nil, {dmg = 15,plr = true,parent = go.get_id()},vmath.vector3(0.4,4,1))
msg.post("/char#tir",“play_sound”)

I wonder if anyone already experienced this glitch, or has a solution to it.

Thank you,

-Catherine

The scale you set is 0.4, 4.0, 1.0 meaning that it is stretched vertically. I assume you rotate it as well? Do you parent it to some other game object?

I didn’t rotate it, but for some reason it makes it stretched on the x axis. But I didn’t set a parent either, would it automatically set the parent to the game object with the factory in it?

I tried to remove the scale parameter from the factory msg and changed the parent object of the bullet and I still had the same problem, I really don’t know what is happening

No, you need to do that explicitly, with a separate “set_parent” message.