Please conduct the following tasks alone. For implementation details you can refer to the lecture slides or the Android developer website. Please do not hesitate to ask me or the tutor if you have any questions. Under „Tip“ you can find some hints for the task. The „Checklist“ specifies what should happen when your implementation is correct.
In the last assignment you learned how to place a andy 3D model when touching the detected plane. Now extend your app in the following way:
Make sure your model file names only have small letters as capital letters are not allowed in the raw folder.
Next animate your model, so it scales up and down like a real heart would beat. Refer to the example for scaling in the slides on animation.
Beware that when using a TransformableNode you need to do the animation differently than with a normal node (see slides for this).
Checklist | |
---|---|
When the user touches on a detected plane a beating heart will appear |
Next let your heart spin automatically, when it is touched. If you want, play a sound too (optional). See the android documentation on how to play sounds on Android.
When the heart is touched a second time let it stop spinning.
Checklist | |
---|---|
The heart starts spinning, when touched | |
When the heart is touched a second time it stops spinning |
Now change the plane texture to some other image, for example a grass image or a simple plane. Choose what you like. See slides for how to do this.
Checklist | |
---|---|
The detected plane looks different |
Now you can add a ViewRenderable that lets you control your heartbeat or rotation speed when touching it. Try out different things and play around with your app. Have fun!
Checklist | |
---|---|
A ViewRenderable appears on an action and can be used to control something |