#that entirely depends on the values you
1 messages · Page 1 of 1 (latest)
just test different values until you've found some you like. it's going to be 100% personal preference
in the video i showed you i used 12 for the regular movement speed and 6 for the drag
ok
angular drag can be left alone since you're preventing rotation anyway
you need to adjust the amount of force you are applying (your various speed variables) and the linear drag
thanks
i appreciate the time you have taken
ok so now that i have settings i like, now we can move on to the very last thing
knockback.
all you need to do for that is apply force when you shoot using -transform.right * whatever variable for the amount of force you want and ForceMode2D.Impulse
ok and this will shoot in the opposite dirrection the gun is facing?
try it and find out
ok
and just to be clear rb.addforce(transform.right * power, ForceMode2D.Impulse); correct?
no, transform.right is already a vector, you don't need to create a new vector2 from it
just multiply it by power
try it and find out
you have a compiler that will give you errors if you've written the code wrong
either the gun or the pivot that rotates, in the video i sent before i used the pivot but either one would work
get input in Update, apply force in FixedUpdate (though like i mentioned before, one-off forces that use ForceMode2D.Impulse are generally fine in Update)
-
so you would push away from the direction faceing the gun
what if i divided by power?
-transform.right is the opposite direction