-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for sitting task, move models into own folder, cleanup
- Loading branch information
Showing
11 changed files
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Assets/Virtual Agents Framework/Samples/Sitting Sample/Assets/Models.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Sitting | ||
|
||
The agent has the ability to sit on chairs or other objects of variable height. To do this, the GameObject the agent should sit on needs to have multiple positions defined, which are marked as Empty child GameObjects. | ||
|
||
|
||
## Requirements | ||
GameObjects intended to be used for sitting must be set up with the following Empty GameObjects as children: | ||
1. **"SitPosition"** - The position where the agent should sit, i.e. the position the hip should rest at while sitting. | ||
2. **"FeetPosition"** - The position the agent should stand before and after sitting. The agent should walk to this position before initiating the task. | ||
3. **"Footrest"** - The position the agent should rest his feet on while sitting. This might be the literal footrest of a chair or an arbitrary position in the air, for chairs where the agent can't reach the ground with their feet. This is the only optional position, as the FeetPosition will be used instead, if it is missing. | ||
|
||
*The Empties should be named exactly as described above.* | ||
|
||
## Usage | ||
After ensuring that a chair GameObject is set up correctly, the agent can be instructed to sit on it by creating a new `AgentSittingTask`. | ||
Its first parameter is the GameObject the agent should sit on, the second parameter is either `SittingDirection.SITDOWN` or `SittingDirection.STANDUP`, depending on whether the agent should sit down or stand up. | ||
Alternatively use `SittingDirection.TOGGLE` to toggle between sitting and standing, depending on the current state. | ||
|
||
```csharp | ||
AgentSittingTask sittingTask = new AgentSittingTask(Chair, SittingDirection.SITDOWN); | ||
AgentSittingTask standingTask = new AgentSittingTask(Chair, SittingDirection.STANDUP); | ||
|
||
taskSystem.ScheduleTask(sittingTask); | ||
taskSystem.Tasks.WaitForSeconds(3); | ||
taskSystem.ScheduleTask(standingTask); | ||
``` | ||
|
||
|
||
## Example Scenes | ||
|
||
The framework contains an example scene that demonstrates the ability to sit on different chairs and stools. | ||
|
||
During execution of the scene, the agent will walk to a chair, sit down, stand up, and then walk to a stool to do the same. |