Hi guys,
Pretty sure I'm missing something obvious here, but can't spot what the issue is.
I have a skeleton and I'm spawning bullets from a child bone using the following code:
var bullet = Instantiate(_bulletPrefab, _turretEmitPoints[turretIndex].position, _turretRotateTransforms[turretIndex].rotation);
bullet.RunOnChildrenRecursive((g) => g.layer = _projectileLayer);
var rigidBody = bullet.GetComponent<Rigidbody2D>();
rigidBody.velocity = rigidBody.transform.right * 5f;
This works fine when the root bone scale is 1, 1, 1 but when I change the root bone scale to 1, 0.7, 1 the rotation is then off. I've tried using WorldRotationX on the bone object itself, but it always seems to ignore the effect scaling in Y has on the world rotation.
Is there another property or some transform I need to apply to get the accurate rotation?
Here the root bone is 1, 1, 1 scale

Here is when the root bone is 1, 0.7, 1 scale
