C
Cam Croft
Guest
I have a player object(oPlayer) with two gun objects, each centered on the player object. The image_angle of the first gun object(oGunNoDelay) always points towards the mouse position, and it works great for aiming.
I'd like to try something different with the second gun object(oGunAuto)...basically, I want to take the difference between oGunNoDelay.image_angle and oGunAuto.image_angle and use it to set oGunAuto's image_angle to be some % 'closer' to oGunNoDelay's image_angle each game step.
I know(for image_angle and direction) right is 0º, up is 90º, left is 180º and down is 270º...but I'm unsure how to use that to accomplish what I'm trying to accomplish.
Ideally, I'd like for oGunAuto to be smart enough to ease towards oGunNoDelay along the shortest 'path'...which feels like a pretty inapplicable term for a rotation. Ha.
Any choice bits of wisdom?
I'd like to try something different with the second gun object(oGunAuto)...basically, I want to take the difference between oGunNoDelay.image_angle and oGunAuto.image_angle and use it to set oGunAuto's image_angle to be some % 'closer' to oGunNoDelay's image_angle each game step.
I know(for image_angle and direction) right is 0º, up is 90º, left is 180º and down is 270º...but I'm unsure how to use that to accomplish what I'm trying to accomplish.
Ideally, I'd like for oGunAuto to be smart enough to ease towards oGunNoDelay along the shortest 'path'...which feels like a pretty inapplicable term for a rotation. Ha.
Any choice bits of wisdom?