So I've made a couple turrets lately, which work great. One problem is that I restricted their aiming arc, which also works great. The projectiles exit the barrel nicely at every angle and stuff. Except when the player aims above the barrel's tilting limit. When the player aims higher than the turret allows, the barrel stops rotating upward as it should. The projectiles however, still get spawned from the player at the angle he's looking.
There's a bone called 'mount0' at the end of the barrel. Would making the bullets come from there solve this?
If so, how do I make them come from that bone?
If it doesn't, how else can I solve this?
EDIT: The bullets seem to get spawned from the
turret's eye bone.
Also here's a gif to explain my problem:
https://gyazo.com/a1fdeebb42afceb11b8dfa7751cdf677EDIT 2: Code-wise I'd say you could just check if the up/down aim vector is above x degrees or below y degrees and just not fire a projectile if that's the case, but I have no idea how to do that.