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

Fix to addAgents for proc scenes. #1032

Merged
merged 5 commits into from
Jun 9, 2022
Merged

Fix to addAgents for proc scenes. #1032

merged 5 commits into from
Jun 9, 2022

Conversation

Lucaweihs
Copy link
Collaborator

Ensures that depth of the agent camera is set in nanna houses.

}
this.agents[0].m_Camera.depth = 9999;
private void addAgents(ServerAction action) {
if (action.agentCount > 1) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we change it to a non-async function? what impact does this have?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the async functionality was there just to ensure that the transforms' positions/rotations were updated as we do some collision checks in addAgents. I believe this should be solved by using Physics.SyncTransforms() rather than waiting for a frame but let me know if not.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok cool, yeah seems like that was the only purpose to wait till the end of frame this looks good.

@AlvaroHG
Copy link
Collaborator

AlvaroHG commented Jun 9, 2022

This makes sense, just a question about the change from an async action. LGTM after that.

@Lucaweihs Lucaweihs merged commit 0626dd7 into nanna Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants