Hello all, first post here.
I'm attempting to make a 2D action platformer, the player sprite has a weapon sprite (a gun) attached to them which aims and fires towards the mouse cursor.
I would like firing the gun to apply a large knockback to the player, in the opposite direction to which way the gun is facing. Physics behaviour seems the most straightforward way of doing this.
I'm aware that attempting to mix platform behaviour and physics behaviour on a sprite is regarded as a bad idea so I've got the player as a having physics behaviour but not platform, movement is done with forces and impulses, is this also a bad idea? An issue I'm finding with this is that having 'Jump' as an upward impulse causes the player to lose all sideways momentum.
Having firing the gun apply an impulse away from the mouse cursor doesn't seem to be working. Could this be because the weapon sprite is pinned to the player sprite? Would it be better to just set the weapon sprite X, Y to the player sprite X, Y every tick?
My project is very rudimentary at the moment and I'm still working on a lot of the fundamentals so I don't think there is much benefit to sharing the .capx at this point.
As you can guess, I'm a noob at this so any help is greatly appreciated, even just general tips and pointers. Thanks!