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

✨ replicate als overlay system #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KptMonkey
Copy link

@KptMonkey KptMonkey commented Aug 7, 2024

Replicates the ALS Overlay system

  • Switching states is replicated

  • Aiming is replicated

  • The on possed logic is now separated into BeginPlay and OnPossesd such that the client gets also the input mapping assigned

  • OverlaySate is a RepNotify

  • SetOverlayStatetReplicated is a new function added to the OverlayGraph - it's called in the W_OverlayStateSwitcher

  • OnRep_OverlayState is a new function (I can't move it to the Overlay Category)

It doesn't replicate the motion matching system, since I didn't wanted to touch the logic there. Since it's about the ALS part and it's so nicely separated in this project.

  • I had to change the "WantsToAim" boolean to replicated
  • I had to expand the aiming logic by a bit, but the orginal code is still there.

@IngCr3at1on
Copy link

IngCr3at1on commented Aug 7, 2024

Orientation on aim seems to be off by 90 degrees. If I face the one player and aim I am looking to that players left, if I face that direction and aim I am then looking away from the observer rather than aiming off to their left. Haven't even begun to look at your changes to see why, just the first thing I noticed when testing.

Thinking about this I think better wording would be: the replicated aim is 90 degrees to my right vs where I'm aiming

@IngCr3at1on
Copy link

@KptMonkey I'm admittedly new to Unreal so forgive me if this is a silly question but I'm wondering if there's a reason or benefit to using OnPossessed and BeginPlay for the controller instantiation vs something like Receive Controller Change?

@KptMonkey
Copy link
Author

@KptMonkey I'm admittedly new to Unreal so forgive me if this is a silly question but I'm wondering if there's a reason or benefit to using OnPossessed and BeginPlay for the controller instantiation vs something like Receive Controller Change?

It's just an easy setup and most people know what is happening. You can always change it in your own project

@KptMonkey
Copy link
Author

Orientation on aim seems to be off by 90 degrees. If I face the one player and aim I am looking to that players left, if I face that direction and aim I am then looking away from the observer rather than aiming off to their left. Haven't even begun to look at your changes to see why, just the first thing I noticed when testing.

Thinking about this I think better wording would be: the replicated aim is 90 degrees to my right vs where I'm aiming

I will have a look the next days

Copy link

@letsplaywithstrings letsplaywithstrings left a comment

Choose a reason for hiding this comment

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

As far as I think you can touch the whole logic to make it fully replicated.

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.

4 participants