Affordances:
Affordances are specifically actions that can only be completed when a specific other thing is present. For example you can only open a door if a door is present.
Using the robot, you can try the 2 implemented affordances.
One is to step on the yellow spring button, which will begin an animation
depicting the spring expanding and contracting with motion (and simultaneously
sending your robot into the air). The second affordance is triggered by
colliding with the brick door to the maze. This will trigger the trap door
which should cause the door to push you into the adjacent hallway if you don’t
move out of the way quickly enough.
Behavior Tree: (uses a modified MyBehaviorTree.cs script)
Behavior Trees model actions taken by characters and can account for user interaction and changes in the environment.
The story here is as follows. There are 3 random buttons and
3 characters. Two of the characters are racing to one of the three buttons,
while the other cheers one of them on. When one reaches the button, the other
stops, admitting defeat. In between the start and end, a character may find his
path obstructed, and pause while the other character races on.
The three branches
here denote the different buttons the characters may head to.
Here the 2 participants racing are done in parallel, but
separate from the cheering participant because if either participant is unable to
read the destination, the cheerer still should be able to do his action.
User interaction:
You can click the steel metal drums and then use the arrow
keys to move them around to obstruct a runner’s path or clear it.
Scalability:
The race could be scalable by adding more cheerers or
runners. Runners would add extra nodes to the Selector in Parallel section of
the second tree, but to add more cheerers, you’d have to add another Selector
in Parallel part before the third character starts cheering.
No comments:
Post a Comment