Search Unity

Question Switch behavior

Discussion in 'Visual Scripting' started by Jochen-Hanisch, Nov 27, 2022.

  1. Jochen-Hanisch

    Jochen-Hanisch

    Joined:
    Oct 7, 2013
    Posts:
    25
    Hello,
    maybe I make some mistakes, but I don't understand why the switch routing behave so different.
    I have a simple cube with a rotation graph on it. If I use the If routing with explicit looking for the space key input, the rotation is fine, as expected. But when I use the switch unit and branch the space key, the rotation is lame. When I'm routing the default output from the switch unit, it looks the same as the If example.

    The If sample:
    IfRotate.JPG

    The switch with space branching
    SwitchRotate_01.JPG

    The switch with default branching
    SwitchRotate_02.JPG