Help with 2nd arm sprite rotation
Hey community,
I have a problem with my soldier holding a two handed weapon first off, you can rotate the weapon 360 degrees. the problem is the background arm rotates with the "holding weapon arm" and it looks kinda weird see picture
Ignore the floating arm :D It looks really unnatural if you e.g. aim up right or aim down right
I already tried hinge joints so( the arm is made of 2 sprites, upper and lower arm),the lower arm can change the angle individually and still stick to the weapon but somehow the hinge joints dont work :/ How can I make the background arm follow naturally like in this picture
any advice is helpful, thanks in advance
Answer by DuB86 · Mar 29, 2018 at 12:14 PM
ok I fiddeled around a bit, it seems I only need to alter rotation for background arms relative to foreground arms e.g. if fa 15° then ba should be 95° I tried to script it but failed
public transform fArm;
public transform bArm;
void Update(){
if (fArm.rotation.z >= 15){
bArm.eulerAngles = new Vector3(0,0,95); }
this code though doesnt work