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

Support draw debug colors on multiplayer #311

Conversation

ameaninglessname
Copy link
Contributor

@ameaninglessname ameaninglessname commented Nov 28, 2021

This PR does two things:

  • Support draw debug colors on multiplayer
  • Fix errors if AnimMan is not the default character mesh

Explanation

Changes for #240 would result in "weird sphere while play as client if show debug shapes on":
image

This is because AALSPlayerCameraManager::CustomCameraBehavior is not run on dedicated server, so the debug draw from server draw the initial location forever.(Initialized in AALSPlayerCameraManager::OnPossess)

This picture is showing the difference between server and client draw debug.(with some test code modification)
(I was play from current camera location, so the server location is in the air)
image
server sphere(left) vs client sphere (right)

Yes debug draw on server will show up in client now

see this commit of unreal b6000dafc0b07743ea859274641c551fbf03b333
image

you can use "show ServerDrawDebug" to toggle server debug draw.

Changes in blueprint

instead of forcing everyone to use "show ServerDrawDebug" to turn off the maybe unwanted drawing, I choose to modify the blueprint:
image

with detailed explanation.

Fix errors if AnimMan is not the default character mesh

the error:
image

Fix:
add two validate funtion:
image
image

Check before do things. to prevent error emits:
image
image

Misc

image

Cache variables to reduce pure function overhead and straighten the lines.

Fix errors if AnimMan is not the default character mesh
@ameaninglessname
Copy link
Contributor Author

Oh, I was doing the blueprint on ue5-main engine branch, so these change need to be re done on lower engine version to avoid blueprint can't be opened issue?

@dyanikoglu
Copy link
Member

Since the PR has lots of fixes together, and assets are saved with ue5-main version, can't merge this PR at this state.

Please base the work on 4.27 and try to keep PR contents simple, otherwise it's really hard to review changes.

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