News Forums RAIN General Discussion and Troubleshooting Trouble with MecanimMotor

This topic contains 3 replies, has 1 voice, and was last updated by  Lutzelodeon 4 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #40235

    Lutzelodeon
    Participant

    Hey,

    Today I updated my RAIN plugin to the newest version.
    My old behaviour tree was not working anymore and this is why I created a similar new one.
    The AI just walks, if I choose the BasicMotor or activate the Override Root Roation option.
    If I activate this option, the AI ist walking on the Route but it’s stuttering to the left and to the right.
    With the old version it worked fine, but I had to download the new one because there was a problem with the navigation mesh tool (It was stopping at the Collision Meshes thing).

    The MecanimMotor:

    https://gyazo.com/0ab1614a2045fc19324090330523413c

    Any ideas?

    #40237

    Lutzelodeon
    Participant

    I tried different ways now.
    The AI is working if I disable the 3D - Moving stuff. But the problem is that the AI has to walk on a top of a hill.
    Maybe it’s easier than I think. But I need a little bit help with this (I mean it’s really annoying :D)
    It works if I use a Basic Motor and set the speed manually but I want Root Motion because the Models speed matches with the animations then.

    #40238

    Lutzelodeon
    Participant

    Now this is not my biggest problem.
    The AI is detecting the Player and go to the position.
    If the AI can’t see the Player anymore it should use the Waypoint Network.
    The only thing the AI is doing then is just spinning on one point (Close enough radius is increased etc.).

    Here is my Behavior Tree:

    <behaviortree version=”1.1″ repeatuntil=”” name=”SimpleAI” debugbreak=”False”>
    <parallel tiebreaker=”fail” succeed=”all” repeatuntil=”” name=”root” fail=”any” debugbreak=”False”>
    <detect sensor=”"eyes"” repeatuntil=”running” name=”eyes” matchtype=”best” entityobjectvariable=”varHero” debugbreak=”False” consistent=”False” aspectvariable=”” aspectobjectvariable=”” aspect=”"Player"” />
    <selector usepriorities=”False” repeatuntil=”” name=”selector” debugbreak=”False”>
    <constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”varHero == null && !isSearching”>
    <parallel tiebreaker=”fail” succeed=”all” repeatuntil=”” name=”parallel” fail=”any” debugbreak=”False”>
    <waypointpatrol waypointsetvariable=”PatrolRoute” waypointactiontype=”patrol” traversetype=”pingpong” traverseorder=”forward” repeatuntil=”” pathtargetvariable=”” name=”Walk” movetargetvariable=”nextWaypoint” debugbreak=”False”>
    <move turnspeed=”” repeatuntil=”” name=”move” movetarget=”nextWaypoint” movespeed=”” facetarget=”” debugbreak=”False” closeenoughdistance=”” closeenoughangle=”” />
    </waypointpatrol>
    <mecparam valueexpression=”0.5″ repeatuntil=”running” parametertype=”float” parametername=”AnimSpeed” name=”mecparam” debugbreak=”False” damptime=”0.15″ />
    </parallel>
    <random repeatuntil=”running” name=”random” debugbreak=”False”>
    <sequencer weight=”” usepriorities=”False” repeatuntil=”” name=”sequencer” debugbreak=”False”>
    <timer waitforsec=”15″ returnvalue=”success” priority=”” name=”timer” debugbreak=”False” />
    <audio waituntildone=”False” repeatuntil=”” priority=”” name=”audio” forcestoponexit=”False” delay=”0″ debugbreak=”False” audiosource=”PatrolSounds” />
    </sequencer>
    <sequencer weight=”” usepriorities=”False” repeatuntil=”” name=”sequencer” debugbreak=”False”>
    <timer waitforsec=”15″ returnvalue=”success” priority=”” name=”timer” debugbreak=”False” />
    <audio waituntildone=”False” repeatuntil=”” priority=”” name=”audio” forcestoponexit=”False” delay=”0″ debugbreak=”False” audiosource=”PatrolSounds2″ />
    </sequencer>
    </random>
    </constraint>
    <constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”varHero != null”>
    <expression returnvalue=”evaluate” repeatuntil=”” name=”expression” expression=”isSearching = true” debugbreak=”False” />
    <sequencer usepriorities=”False” repeatuntil=”” name=”sequencer” debugbreak=”False”>
    <parallel tiebreaker=”fail” succeed=”all” repeatuntil=”” priority=”” name=”parallel” fail=”any” debugbreak=”False”>
    <audio waituntildone=”True” repeatuntil=”” name=”audio” forcestoponexit=”False” delay=”0″ debugbreak=”False” audiosource=”Parasite_L_Starkie” />
    <move turnspeed=”” repeatuntil=”” name=”move” movetarget=”varHero” movespeed=”” facetarget=”” debugbreak=”False” closeenoughdistance=”” closeenoughangle=”” />
    <mecparam valueexpression=”1″ repeatuntil=”running” parametertype=”float” parametername=”AnimSpeed” name=”mecparam” debugbreak=”False” damptime=”0.15″ />
    </parallel>
    </sequencer>
    </constraint>
    <constraint repeatuntil=”” priority=”” name=”constraint” debugbreak=”False” constraint=”varHero == null && isSearching”>
    <parallel tiebreaker=”fail” succeed=”all” repeatuntil=”” name=”parallel” fail=”any” debugbreak=”False”>
    <waypointpath waypointsetvariable=”Wander” waypointactiontype=”path” traversetype=”pingpong” traverseorder=”forward” repeatuntil=”” pathtargetvariable=”"varMoveTo"” name=”waypointpath” movetargetvariable=”varNextWander” debugbreak=”False”>
    <move turnspeed=”” repeatuntil=”” name=”move” movetarget=”varNextWander” movespeed=”” facetarget=”” debugbreak=”False” closeenoughdistance=”” closeenoughangle=”” />
    </waypointpath>
    <mecparam valueexpression=”0.75″ repeatuntil=”running” parametertype=”float” parametername=”AnimSpeed” name=”mecparam” debugbreak=”False” damptime=”0.15″ />
    <sequencer usepriorities=”False” repeatuntil=”” name=”sequencer” debugbreak=”False”>
    <timer waitforsec=”30″ returnvalue=”success” priority=”” name=”timer” debugbreak=”False” />
    <expression returnvalue=”evaluate” repeatuntil=”” priority=”” name=”expression” expression=”isSearching = false” debugbreak=”False” />
    </sequencer>
    <random repeatuntil=”” name=”random” debugbreak=”False”>
    <sequencer weight=”” usepriorities=”False” repeatuntil=”” name=”sequencer” debugbreak=”False”>
    <timer waitforsec=”5″ returnvalue=”success” priority=”” name=”timer” debugbreak=”False” />
    <audio waituntildone=”False” repeatuntil=”” priority=”” name=”audio” forcestoponexit=”False” delay=”0″ debugbreak=”False” audiosource=”SearchSounds” />
    </sequencer>
    <sequencer weight=”” usepriorities=”False” repeatuntil=”” name=”random” debugbreak=”False”>
    <timer waitforsec=”5″ returnvalue=”success” priority=”” name=”timer” debugbreak=”False” />
    <audio waituntildone=”False” repeatuntil=”” priority=”” name=”audio” forcestoponexit=”False” delay=”0″ debugbreak=”False” audiosource=”SearchSounds2″ />
    </sequencer>
    </random>
    </parallel>
    </constraint>
    </selector>
    </parallel>
    </behaviortree>

    #40243

    Lutzelodeon
    Participant

    Here is the navigation target problem as a gif:
    https://gyazo.com/b3a0382de65c1ad65dbe3550084f8667

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.