aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/extantz/scenri.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-03-13 20:07:06 +1000
committerDavid Walter Seikel2016-03-13 20:07:06 +1000
commitecd63ff10aeef298fe4e939a9667d1ee73cd8c4d (patch)
tree316168f742e09fdb98502ea2981342d920f68c16 /src/extantz/scenri.c
parentResizing cleanup. (diff)
downloadSledjHamr-ecd63ff10aeef298fe4e939a9667d1ee73cd8c4d.zip
SledjHamr-ecd63ff10aeef298fe4e939a9667d1ee73cd8c4d.tar.gz
SledjHamr-ecd63ff10aeef298fe4e939a9667d1ee73cd8c4d.tar.bz2
SledjHamr-ecd63ff10aeef298fe4e939a9667d1ee73cd8c4d.tar.xz
Add an avatar, and hook the camera up to it.
Diffstat (limited to 'src/extantz/scenri.c')
-rw-r--r--src/extantz/scenri.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/extantz/scenri.c b/src/extantz/scenri.c
index 7662a96..4074b61 100644
--- a/src/extantz/scenri.c
+++ b/src/extantz/scenri.c
@@ -821,6 +821,21 @@ void stuffsSetup(ExtantzStuffs *stuffs, Scene_Data *scene, int fake)
821 stuffs->animateStuffs = (aniStuffs) _animateSonic; 821 stuffs->animateStuffs = (aniStuffs) _animateSonic;
822// else if (4 == fake) 822// else if (4 == fake)
823// stuffs->animateStuffs = (aniStuffs) _animateSphere; 823// stuffs->animateStuffs = (aniStuffs) _animateSphere;
824 else if (5 == fake)
825 {
826 scene->avatar_node = stuffs->mesh_node;
827
828 // Grab the camera for the avatar.
829 evas_canvas3d_node_member_del(evas_canvas3d_node_parent_get(scene->camera_node), scene->camera_node);
830 evas_canvas3d_node_member_add(scene->avatar_node, scene->camera_node);
831
832 evas_canvas3d_node_position_inherit_set(scene->camera_node, TRUE);
833 evas_canvas3d_node_position_set(scene->camera_node, 0.0, 2.5, -1.7);
834
835 evas_canvas3d_node_orientation_inherit_set(scene->camera_node, TRUE);
836 evas_canvas3d_node_orientation_set(scene->camera_node, 0.0, 0.0, 0.0, 1.0);
837 evas_canvas3d_node_look_at_set(scene->camera_node, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 10.0, EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0);
838 }
824} 839}
825 840
826ExtantzStuffs *addStuffs(char *uuid, char *name, char *description, char *owner, 841ExtantzStuffs *addStuffs(char *uuid, char *name, char *description, char *owner,