Skip to content

Commit

Permalink
Make newer Neptunia series Live2D models compatible with hit events
Browse files Browse the repository at this point in the history
  • Loading branch information
guansss committed Feb 27, 2020
1 parent 69b7bf8 commit 240ab7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/core/live2d/ModelSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ export default class ModelSettings {
physics: files.find(f => f.includes('physics')),
hit_areas: neptuniaModelName
? [
{ name: 'head', id: 'D_REF.PT_HEAD' },
{ name: 'mouth', id: 'D_REF.PT_MOUTH' },
// use the name trick to bind these parts with compatible hit events
{ name: 'body', id: 'D_REF.PT_HEAD' },
{ name: 'head', id: 'D_REF.PT_MOUTH' },
]
: undefined,
expressions: files.filter(f => f.includes('exp/')).map(f => ({ name: f, file: f })),
Expand Down
3 changes: 0 additions & 3 deletions src/module/live2d-event/hit-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ export default function registerHitEvent(sprite: Live2DSprite) {
break;

case 'body':
sprite.model.motionManager.startRandomMotion('tapBody');
break;

case 'belly':
sprite.model.motionManager.startRandomMotion('tapBody');
break;
Expand Down

0 comments on commit 240ab7f

Please sign in to comment.