It looks like you're new here. If you want to get involved, click one of these buttons!
;ShipBase.ini
[Ship] ; Object
Graphic = ShipGraphic
Position = (512.0, 512.0, 80.0)
Body = ShipBody
Type = "Ship"
[ShipGraphic]
pivot = center
TextureSize = (24, 26, 0)
TextureCorner = (48, 0, 0)
[ShipGraphic]
Texture = ../Gameplay/Characters/Laser/Laser.png
Pivot = center
;ShotBase.ini
[Shot] ; Object
Type = "Shot"
Graphic = ShotGraphic
Color = (255, 255, 0) # (0, 255, 0) # (255, 0, 255) # (0, 255, 255)
Scale = (2.0, 2.0, 0) ; NB: z is ignored for 2D objects
BlendMode = add
Speed = (100, 0, 0)
Body = ShotBody
UseParentSpace = true
[ShotGraphic] ; Graphics
Texture = ../Gameplay/Characters/Shot.png
Pivot = center
;Laser.ini
[Ship]
Spawner = RedSpawner
[Shot]
UseParentSpace = true
[RedSpawner] ; Spawner
Object = Shot
WaveSize = 3
WaveDelay = 0.0
ObjectSpeed = (0,-500,0)
UseSelfAsParent = true ;NB: If set to true, the created object's parent will be the spawner. Defaults to false;
ShotDamage = 1
Comments
There's been a thread on this issue: using spawner parenting with objects that have a physics body.
It's a bug in orx that has been solved a month ago.
To verify it's the same issue, remove the body from your laser and if it follows correctly your spawner that means it was the bug I fixed.