med-material / Whack_A_Mole_VR

Whack-A-Mole in VR
MIT License
3 stars 15 forks source link

Animation feedback for moles #228

Closed lucasmnt closed 1 year ago

lucasmnt commented 1 year ago

Addition of two new animations :

- PopCorrectMole.anim => plays when you hit a correct mole
- PopWrongMole.anim => plays when you hit a distractor mole, or when a correct mole disappear via its timer

image

Modification of the diskMole prefab :

- Addition of a ImagePlaceholder game object
- Adding checkmark-correct and checkmark-wrong as child of ImagePlaceholder.

image

Modification of the diskMole.cs script to be able to play the new animations : not much has really changed in the code, beside some minor changes in the name of animations to play, depending on the mole state :

image

Here is an exemple of what PopCorrectMole.anim and PopWrongMole.anim will look like :

MolesfeedbackV3color

This animation plays when :

- Player succesfully click on a correct mole before it disappears ;

MolesfeedbackV3wrong

This animation plays when :

- Player misses a correct mole (it disappears via its timer) ;
- Player clicks on a distractor mole ;

See the old conversation about this issue here :

221