Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animate state #84

Closed
he727425209 opened this issue Aug 8, 2018 · 2 comments
Closed

animate state #84

he727425209 opened this issue Aug 8, 2018 · 2 comments

Comments

@he727425209
Copy link

Hi,

I notice that in the BaseFPSAgentController.cs, there are dictonaries of animate state:
protected Dictionary<SimObjType, Dictionary<string, int>> OPEN_CLOSE_STATES = new Dictionary<SimObjType, Dictionary<string, int>>{
{SimObjType.Microwave, new Dictionary<string, int>{{"open", 2}, {"close", 1}}},
{SimObjType.Laptop, new Dictionary<string, int>{{"open", 2}, {"close", 1}}},
{SimObjType.Book, new Dictionary<string, int>{{"open", 1}, {"close", 2}}},
{SimObjType.Toilet, new Dictionary<string, int>{{"open", 2}, {"close", 3}}},
{SimObjType.Sink, new Dictionary<string, int>{{"open", 2}, {"close", 1}}}
};

I am just wondering how did you guys figure out the animated state and the integer, like how do you guys know open is correspond to integer 2 not 1, etc.

Best

@winthos
Copy link
Collaborator

winthos commented Aug 14, 2018

We know which state corresponds to what integer because that's just how the object was created. For example, when the Book sim object was created, the convertable script keeping track of animations simply had state 1 set to open and state 2 set to close. We could have easily mapped state 2 to open and state 1 to close, all that matters is that no two states share the same value.

@mattdeitke
Copy link
Member

Closing as this appears solved :)

Lucaweihs added a commit that referenced this issue Sep 9, 2021
Running black, optimizing imports, and inelegant merging of engines (currently kept as separate files).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants