Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- feetAnimate() {
- if( !this.walking ) return;
- this.walkOffset += 0.04;
- this.foot1.rotation.x = Math.sin( this.walkOffset ) / 4; // 後腳左
- this.foot2.rotation.x = -Math.sin( this.walkOffset ) / 4; // 前腳左
- this.foot3.rotation.x = -Math.sin( this.walkOffset ) / 4; // 後腳右
- this.foot4.rotation.x = Math.sin( this.walkOffset ) / 4; // 前腳右
- }
- headAnimate() {
- if( !this.headSwinging ) return;
- this.rotateHeadOffset += 0.04;
- this.head.rotation.y = Math.sin( this.rotateHeadOffset );
- }
Advertisement
Add Comment
Please, Sign In to add comment