Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- update(dt) {
- const { angleSpeed } = this;
- if (angleSpeed !== 0) {
- const angle = this.angle = MathUtilities.clamp(this.angle + angleSpeed * dt,
- this.leftMaxAngle * -1,
- this.rightMaxAngle);
- this.barrel.rotation = angle;
- }
- }
Add Comment
Please, Sign In to add comment