It looks like you're new here. If you want to get involved, click one of these buttons!
When using spawners with the "UseRelativeSpeed" flag along with scaling of parent objects, rotation is applied before scaling. This can cause problem when using scaling to flip objects. Taking "The Beginner's Guide to Orx" as an example where we use scaling to flip the hero and set the "UseRelativeSpeed" flag to "spawner" in the "BulletSpawner" section. If a non-zero rotation is applied to the hero, the bullets won't fly in the right direction when the hero is flipped. Just as shown below,
This is because the parent object's scale is applied piror to the its rotation, which can be seen from the code in "orxSpawner.c:823",
orxVector_Mul(&vSpeed, orxVector_2DRotate(&vSpeed, &(pstSpawner->vSpeed), pstSpawner->fPendingRotation), pstSpawner->pvPendingScale);
This problem can be solved by modifying the line to
orxVector_2DRotate(&vSpeed, orxVector_Mul(&vSpeed, &(pstSpawner->vSpeed), pstSpawner->pvPendingScale), pstSpawner->fPendingRotation);
All three similar lines in the switch statement should be modified accordingly. Then the direction of bullets will correctly follow the direction of hero.