{"id":692,"date":"2017-04-13T10:00:00","date_gmt":"2017-04-13T08:00:00","guid":{"rendered":"https:\/\/blogs.autodesk.com\/villagebim\/2017\/04\/autodesk-stingray-creer-un-declencheur-d-evenement.html"},"modified":"2017-04-13T10:00:00","modified_gmt":"2017-04-13T08:00:00","slug":"autodesk-stingray-creer-un-declencheur-d-evenement","status":"publish","type":"post","link":"https:\/\/blogs.autodesk.com\/villagebim\/2017\/04\/autodesk-stingray-creer-un-declencheur-d-evenement.html","title":{"rendered":"Autodesk Stingray : Cr\u00e9er un d\u00e9clencheur d\u2019\u00e9v\u00e8nement"},"content":{"rendered":"<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8bd970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"268\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca1e970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Lorsque l\u2019on visite une sc\u00e8ne en mode immersif ou pas, il est toujours int\u00e9ressant d\u2019avoir une certaine interactivit\u00e9 avec les objets qui nous entourent.<\/p>\n<p style=\"text-align: justify\">Je vous propose un tutoriel sur le logiciel Autodesk Stingray pour r\u00e9aliser des d\u00e9clencheurs d&#039;\u00e9v\u00e9nement de type \u201czone\u201d et de type &quot;touche clavier&quot;.<\/p>\n<p style=\"text-align: justify\">Dans le monde de l\u2019architecture, le premier \u00e9v\u00e9nement auquel on pense, c\u2019est celui de l\u2019ouverture \/ fermeture d\u2019une porte lorsque un avatar se trouve dans la zone proche de celle-ci. C\u2019est donc cet exemple que je vais r\u00e9aliser.<\/p>\n<p style=\"text-align: justify\">Nota : pour r\u00e9aliser cet exemple, j\u2019ai utilis\u00e9 le gabarit \u2018&#039;<em>Basic<\/em>\u201d du logiciel Autodesk Stingray.<\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\"><strong><u>1 \u2013 Cr\u00e9ation de la zone de d\u00e9clenchement:<\/u><\/strong><\/p>\n<p style=\"text-align: justify\">Dans l\u2019onglet \u201c<em>Create<\/em>\u201d, nous allons utiliser l\u2019option \u201c<em>Trigger<\/em>\u201d:<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca26970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"213\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8ca970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"244\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<ul>\n<li>Cr\u00e9ez le volume &quot;d\u00e9clencheur&quot; devant la porte :<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8de967e970b-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"201\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8d5970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Dans les propri\u00e9t\u00e9s de ce volume, utilisez le \u201c<em>Character_trigge<\/em>r\u201d dans le champs : \u201c<em>Shape template<\/em>\u201d.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8e0970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"183\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca32970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"354\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Cette fonction rend compatible l\u2019utilisation d\u2019avatars avec ce d\u00e9clencheur.<\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\"><strong><u>2- Cr\u00e9ation du script Flow :<\/u><\/strong><\/p>\n<p style=\"text-align: justify\">Nous avions d\u00e9j\u00e0&#160; \u00e9voqu\u00e9 ce mode de programmation et donc dans le cadre de ce tutoriel, je vous propose de l\u2019utiliser.<\/p>\n<p style=\"text-align: justify\"><span style=\"text-decoration: underline\">Quelques mots sur Flow :<\/span> il s\u2019agit d\u2019un langage de programmation visuelle au m\u00eame titre que Dynamo for Revit. Cela consiste \u00e0 placer des n\u0153uds qui ont chacun une sp\u00e9cificit\u00e9 et \u00e0&#160;les relier ensemble pour r\u00e9aliser une (ou des ) action(s).<\/p>\n<p style=\"text-align: justify\">Nous allons s\u00e9lectionner le volume &quot;d\u00e9clencheur&quot; nouvellement cr\u00e9\u00e9, puis nous allons activer l&#039;interface Flow en cliquant dans l\u2019onglet \u201c<em>Level Flow (en haut \u00e0 gauche)<\/em>\u201d:<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8e4970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"129\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca36970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"304\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Clic droit, puis choisissez \u201c<em>Create Level Trigger trigger<\/em>\u201d.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca3b970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"155\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8de968a970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"304\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Cette action cr\u00e9e le n\u0153ud associ\u00e9 au volume &quot;d\u00e9clencheur&quot;.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8eb970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"283\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8de9690970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"304\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Nous allons r\u00e9aliser la m\u00eame op\u00e9ration concernant l\u2019objet porte :<\/p>\n<ul>\n<li>Retournez dans l\u2019interface graphique,<\/li>\n<li>S\u00e9lectionnez la porte,<\/li>\n<li>puis&#160;dans le \u201c<em>Level Flow<\/em>\u201d, clic droit et s\u00e9lectionnez \u201c<em>Create Level Unit XXX<\/em>\u201d<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca4c970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"123\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8f1970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"304\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Nous allons cr\u00e9er le n\u0153ud qui jouera les animations :<\/p>\n<ul>\n<li>appuyez sur la touche \u201c<em>Tab<\/em>\u201d de votre clavier, cela ouvre le champ de recherche,<\/li>\n<li>tapez dans le champs de recherche \u201c<em>Clip<\/em>\u2026\u201d,<\/li>\n<li>s\u00e9lectionnez \u201c<em>Play animation Clip \u2018&#039;(Animation)\u201d<\/em><\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca51970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"86\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8f5970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;margin: 0px auto;padding-right: 0px;border: 0px\" title=\"image\" width=\"244\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Dans le n\u0153ud \u201c<em>Play animation Clip\u201d,<\/em> nous allons assigner la variable \u201c<em>Loop<\/em>\u201d \u00e0 \u201c<em>False<\/em>\u201d pour \u00e9viter que l&#039;animation soit jou\u00e9e en boucle.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f8fa970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"448\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca57970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"354\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<ul>\n<li>copiez\/collez le n\u0153ud \u201c<em>Play animation Clip\u201d (Ctrl C et Ctrl V de votre clavier),<\/em><\/li>\n<li>associez pour chaque n\u0153ud<em>&#160;\u201c<em>Play animation Clip\u201d&#160;<\/em><\/em> une animation en cliquant sur le bouton d\u00e9di\u00e9 sur la ligne \u201c<em>Animation<\/em>\u201d du n\u0153ud (\u00e0 l\u2019\u2019une porte ouverte, \u00e0 l\u2019autre porte ferm\u00e9e),<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca5d970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"310\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca61970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<ul>\n<li>nous allons connecter l\u2019\u201d<em>unit<\/em>\u201d aux n\u0153uds d\u2019animation comme montr\u00e9 ci-dessous :<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f905970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"416\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f909970c-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Nota : Dans le cas o\u00f9 votre sc\u00e8ne poss\u00e8de plusieurs portes, cela permettra d\u2019appliquer l\u2019animation uniquement \u00e0 cette porte.<\/p>\n<ul>\n<li>Connectez le n\u0153ud \u201c<em>Trigger<\/em>\u201d :<\/li>\n<\/ul>\n<p style=\"text-align: justify\">&#160; &#160; &#160; &#160; &#160; &#160; &#8211; de la borne \u201c<em>Touched<\/em> \u201c \u00e0 la borne \u201c<em>Play<\/em>\u201d de l\u2019animation Porte Ouverte,<\/p>\n<p style=\"text-align: justify\">&#160; &#160; &#160; &#160; &#160; &#160;- de la borne \u201cUnt<em>ouched<\/em> \u201c \u00e0 la borne \u201c<em>Play<\/em>\u201d de l\u2019animation Porte Ferm\u00e9e,<\/p>\n<p style=\"text-align: justify\">Soit le graphe ci-dessous :<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca66970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"418\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca72970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Pour tester votre programmation visuelle, cliquez sur le touche \u201c<em>F8<\/em>\u201d de votre clavier ou cliquez sur le bouton \u201c<em>Run<\/em>\u201d.<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca78970d-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"170\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8de96b2970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;margin: 0px auto;padding-right: 0px;border: 0px\" title=\"image\" width=\"114\" \/><\/a><\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\">Une fois la sc\u00e8ne charg\u00e9e, appuyez sur la touche \u201c<em>F2<\/em>\u201d de votre clavier pour activer le mode \u201c<em>Avatar<\/em>\u201d.<\/p>\n<p style=\"text-align: justify\">Si tout c\u2019est bien pass\u00e9, la porte doit s\u2019ouvrir lorsque vous \u00eates dans le volume de d\u00e9clenchement et doit se fermer lorsque vous en sortez.<\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p style=\"text-align: justify\"><strong>3<u>&#8211; Ajout de touche clavier pour actioner la porte dans le scrip Flow :<\/u><\/strong><\/p>\n<p style=\"text-align: justify\">De retour dans le mode \u201c<em>Level Flow<\/em>\u201d :<\/p>\n<ul>\n<li>appuyez sur la touche \u201c<em>Tab<\/em>\u201d de votre clavier, ouvrez le champ de recherche,<\/li>\n<li>tapez dans le champs de recherche \u201c<em>key\u201d,<\/em><\/li>\n<li>choisissez le n\u0153ud <em>\u201cKeyboard Button (input)\u201d<\/em>,<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f910970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"66\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01bb0981ca81970d-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;margin: 0px auto;padding-right: 0px;border: 0px\" title=\"image\" width=\"188\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<ul>\n<li>sur la ligne \u201c<em>Button Name<\/em>\u201d, cliquez sur le symbole \u201c<em>Modification<\/em>\u201d puis choisissez la lettre \u201c<em>P<\/em>\u201d,<\/li>\n<\/ul>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f914970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"135\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8de96c5970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<ul>\n<li>enfin r\u00e9alisez les connexions suivantes :&#160;&#160;&#160;<\/li>\n<\/ul>\n<p style=\"text-align: justify\">&#160; &#160; &#160; &#160; &#160; &#160;- de la borne \u201c<em>Pressed<\/em>\u201c \u00e0 la borne \u201c<em>Play<\/em>\u201d de l\u2019animation Porte Ouverte,<\/p>\n<p style=\"text-align: justify\">&#160; &#160; &#160; &#160; &#160; &#160;- de la borne \u201c<em>Released<\/em>\u201c \u00e0 la borne \u201c<em>Play<\/em>\u201d de l\u2019animation Porte Ferm\u00e9e,<\/p>\n<p style=\"text-align: justify\">Soit le graphe ci-dessous :<\/p>\n<p><a href=\"http:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b8d268f92a970c-pi\"><img loading=\"lazy\" decoding=\"async\" alt=\"image\" border=\"0\" height=\"398\" src=\"https:\/\/villagebim.typepad.com\/.a\/6a015391e15a28970b01b7c8de96e5970b-pi\" style=\"background-image: none;padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px;margin-left: auto;margin-right: auto\" title=\"image\" width=\"454\" \/><\/a><\/p>\n<p style=\"text-align: justify\">Nota : lorsque vous laissez enfonc\u00e9e la touche \u201c<em>P<\/em>\u201d, la porte s\u2019ouvre et lorsque vous rel\u00e2chez la touche \u201cP\u201d, la porte se ferme.<\/p>\n<p style=\"text-align: justify\">Pour ceux qui d\u00e9teste lire (dommage vous \u00eates arriv\u00e9 jusque ici :)), voici ma vid\u00e9o ci-dessous :<\/p>\n<p style=\"text-align: justify\">&#160;<\/p>\n<p class=\"asset-video\" style=\"text-align: center\">\n<p style=\"text-align: justify\">&#160;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#160; Lorsque l\u2019on visite une sc\u00e8ne en mode immersif ou pas, il est toujours int\u00e9ressant d\u2019avoir une certaine interactivit\u00e9 avec les objets qui nous entourent. Je vous propose un tutoriel sur le logiciel Autodesk Stingray pour r\u00e9aliser des d\u00e9clencheurs d&#039;\u00e9v\u00e9nement de type \u201czone\u201d et de type &quot;touche clavier&quot;. Dans le monde de l\u2019architecture, le premier [&hellip;]<\/p>\n","protected":false},"author":13092,"featured_media":2472,"menu_order":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[17,57,19],"tags":[20,995,997,998,996],"class_list":["post-692","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nouveautes","category-programmation-visuelle","category-visualisation","tag-autodesk","tag-autodesk-stingray","tag-declencheur","tag-porte","tag-trigger","dhig-theme--light"],"acf":[],"_links":{"self":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/posts\/692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/users\/13092"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/comments?post=692"}],"version-history":[{"count":0,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/posts\/692\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/media\/2472"}],"wp:attachment":[{"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/media?parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/categories?post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.autodesk.com\/villagebim\/wp-json\/wp\/v2\/tags?post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}