#multiplayer

1 messages ยท Page 280 of 1

nova wasp
#

but if this works it works

#

basically this "missing" would get you stuck attacking

#

which might not be a big deal in practice

verbal dust
#

what do you mean? Ive been using this setup for all my montages so im hoping its not completely wrong ๐Ÿ˜…

nova wasp
#

it's not "wrong" at all, it's just that if this doesn't reach you you miss it

#

if it's unreliable

verbal dust
#

ok i get it. would setting it to reliable not fix that?

nova wasp
#

property replication is also "unreliable" in practice as you can miss things here and there but it will be entually correct

#

yeah using reliable would fix it but it might be pricy to make it reliable if this happens a lot

#

also late-joiners would miss it but that probably doesn't matter for something so short lived

verbal dust
#

montages wouldnt be getting executed every frame, maybe every 20 frames for short ones. there could be a few montages at a time for several players + enemies though

#

i dont know how bad that is

nova wasp
#

it's probably not so bad at that scale

verbal dust
#

whats the other option?

nova wasp
#

using an onrep that describes the montage state

#

with maybe even an increnting number for uniqueness

#

if you find reliables work here you can absolutely stick with it and just measure bandwidth to see if it gets bad

#

sending the name will be kinda brutal on default replication though either way

#

I would recommend turning that into an integer of the sections

#

no need for an entire string here

#

as they both have the same montage asset

#

sending the montage asset the first time will send it as a string but it will be resolved to a smaller id for future sending (so it's perfectly fine here)

verbal dust
#

I think worst case even with it unreliable, most montages are not looping, and the looping ones will be overridden the next time a montage is played so its not that bad

nova wasp
#

if it gets stuck looping you could arguably add a simple timer that goes "wait, you should not be doing this at all right now"

#

as a timeout so to speak

#

if it's not reasonable to be attacking for 4 seconds straight without a new rpc

verbal dust
#

yeah in cases like that for sure

#

I will make a note of onreps though for when I refactor all this stuff, thanks

nova wasp
#

The best example of "fully featured" montage replication is probably the GAS component
(you don't need to use all of GAS to use that part, it's just an onrep that ticks on the server to see what's new about the montage while a montage is playing)

#

but you don't need to go that far

#

you kinda already figured out how to send a section etc

verbal dust
#

would you suggest using GAS? i didn't want to jump into that because I dont know much about whats going on in general and it seemed daunting. I'm not doing any PVP stuff or worried about cheating, probably going to have client authority over movement to be safe too if thats relevant

nova wasp
#

GAS is more useful if you need a an ability client-prediction setup

#

or are already familiar with it

#

but you probably do not need it for this... I think you might find some of it useful but it is very complicated in both good and bad ways

#

it has a lot of awesome ideas that would be useful outside of it but also a lot of complexity and requires C++ to really use (might be some plugin that exposes it but... eh)

#

you are on the right track just using client auth movement for a co-op game

#

you dodge an insane amount of complexity by doing that

#

(yeah people could speedhack but... I personally would not care lol)

verbal dust
#

ah shit swtching from the debug key input didnt actually fix it, i just forgot i turned use controller rotation yaw on in defaults

nova wasp
#

Are you running on a listen server or dedicated setup?

#

simple thing might be to just draw the current state of that bool in-world

#

to see wtf it's doing over time

verbal dust
#

listen server

#

no plans for dedicated servers

#

well this works its just not what I read online

nova wasp
#

do you have "p.NetEnableListenServerSmoothing on?

#

I would suggest not using a separate rpc

#

include that inside of the montage rpc

#

or inside of the montage as an anim state

#

2 rpcs = one could show up and one could show up N frames later

#

you are introducing more randomness this way

#

adding a boolean value to an rpc costs... 1 bit of network bandwidth

#

it's almost free

verbal dust
#

I reuse the montage rpc for every montage though, and I'm only using this controller yaw bool for this one function

nova wasp
#

then make a new rpc that does the montage with an extra bool param?

#

trying to avoid making a new rpc or changing an existing one is not worth introducing more complexity in network timing (by having this be 2 separate ones)

verbal dust
#

thanks fot the tip

open wave
#

i have rebuilt the map then rebuilt the server and client but when the client joins they are getting booted

nova wasp
#

you could override APawn::FaceRotation to do exactly what you want but idk if BP has an equivalent (could just bonk the rotation on tick arguably)

verbal dust
#

thanks for talking me through all that

open wave
nova wasp
# open wave sorry i dont quiet follow the log

this is a forum post that tells you what to do

You can revert to the old behavior with the -pieviaconsole command line flag when running the uncooked server (e.g. UnrealEditor.exe YourProject.uproject -server -pieviaconsole โ€ฆ). Though this may introduce issues (that Iโ€™m not aware of) that the commit was fixing.
nova wasp
#

(not sure if it will work or not, just all I could find)

open wave
#

Yeah thats cool ill test it out cant hurt this is in package build tho

mighty trout
#

void ACbPlayerController::BeginPlay()
{
Super::BeginPlay();
AHUD *hud=GetHUD();
}

my gethud is returning null value always in player controller but my playerhud has already added widget in the viewport does anybody know about this issue as this problem is only there on client

nova wasp
#

ClientSetHUD_Implementation

mighty trout
#

i think client create their own hud and server will no have any hud refernce so there is no usage of rpc

nova wasp
#

there is no need to guess

mighty trout
# nova wasp there is no need to guess

i have another project where i am getting hud and they are working
currently i am facing this issue in this new project
yes in begin play the hud is null but how it is working in my other project

nova wasp
#

if you figure out what creates the hud you can figure out when you can run your code here in beginplay there instead

mighty trout
#

yes i just want to know the concept how hud is not valid on client as it should be the part of client as server do no have any usage of hud

nova wasp
#

I already told you how to figure that out

#

at no point did I tell you the server has a HUD on it for that player

#

I am telling you that the server sends an RPC that tells which HUD class to use to the player controller

#

you do not need to DM me, you can just read the messages I sent earlier

#

a default AHud is created in post init components but the "real" intended one is from a server->client RPC

#

which on a listen server just runs on itself

#

you could change this to always use the same HUD class spawned in the same place locally each time and just ignore the rpc way too if you wanted to

#

the intention here I assume was that servers can set a new hud class

nova wasp
#

and then override AGameModeBase::InitializeHUDForPlayer_Implementation or just override APlayerController::ClientSetHUD_Implementation to do nothing

#

I don't really know if this is better than just using the default way or not but I see no reason this would have obvious issues

#

big downside being if you plan to have differnet huds based on conditions

mighty trout
#

just want to know that my hud is adding widget to viewport on client and still player controller gethud() value is null how? there must be a refernce of it on client

nova wasp
# mighty trout ?

the rpc way makes it so the server can choose which hud class is spawned (which is kinda neat but... I think most games just use the same HUD class every time lol)

nova wasp
#

I already told you what did it, you told me you don't think it's true and I told you you can prove it with a breakpoint

#

I'm struggling to communicate with you here man lol

#

sorry if my earlier messages were not clear

mighty trout
nova wasp
#

replication order is kinda arbitrary

#

so I have no idea

#

a packet with an rpc or replication can show up whenever it wants

#

it just... tends to be close

#

it could be the older projects had the new object + the rpc for it show up and be read in the same frame due to the connection having less in the bunch but I have no clue how the initial bunch works with rpcs and player controllers as they are kinda the handle to the connection

#

or maybe the older project just spawned the hud manually? I can't see what your old project is doing or if the way this works has changed (I'm reading 5.7)

#

feel free to open the old project and... add a breakpoint like I mentioned earlier

mighty trout
nova wasp
#

if it's based on an rpc there is NO gaurantee EVER it will run before beginplay

#

as far as I know

#

it is a reliable RPC but that doesn't really gaurantee the timing, just the order relative to other reliables

#

but it's possible something changed between versions I am not aware of

#

did your old game not have a custom HUD class?

mighty trout
#

i have and my widgets are added through it

bitter remnant
#

I still have no clue, why it won't work

chrome bay
bitter remnant
chrome bay
#

CVD will have two tracks at the bottom, one is server the other client. Just uncheck the visibility of the client(s)

bitter remnant
#

The Engine is kidding me...
Now it works on dedicated server.

But I did not change a single thing.
I just shut down my pc over night and started the engine again from rider...
Even the animation is not root motion anymore and it works...

I hate magic

limber gyro
#

Im trying to get the player controller on a client so i can do a "set view target with blend" to set the camera location at the beginning of the game for character select, whats the best way? im using BP

fossil spoke
#

Whats the best way depends on where you want to access it from.

#

If you are trying this from the Pawn, you can access its Controller directly.

#

The same can be said for the PlayerState.

limber gyro
#

ye, i just noticed that i was actually able to get it, it was something else causing issues

fossil spoke
#

Keep in mind that PlayerControllers only exist on the owning client for that client.

#

(and on the Server obviously)

limber gyro
#

I cant get the thing to work on the client so im gonna ask for help, here the issue, i set the view target to a custom camera in the map and it works fine but half a second later it switches to the pawn camera, i am assuming some event is switching the camera target back, does any 1 have any idea?

#

im calling the logic inside a pawn right after the character select widget is created so it has to be something that takes a while to be called i belive

fossil spoke
#

You may need to look at a few properties on the PlayerCameraManager

#

They control if the Server overrides the Camera position

#

Ive forgotten their name off the top of my head

limber gyro
#

so you think that the server is overriding the camera target, is this like an event or do you happen to know if this happens after a certain event? cause if i put a delay on the thing it works so its not overriding the position all the time

fossil spoke
#

I have no idea man, it all depends on exactly what it is you are doing. You have barely paraphrased what you are doing so I couldnt even properly speculate.

limber gyro
#

let me show you

#

behind that tick is just the creation of a widget

#

im not doing anything complicated

#

i tried those 3 events and they all have the same result

#

the server spawns a "character select pawn" which is the deafault pawn of the gamemode, that paawn than creates a widget which you can click to select your character, the character selection is not relevant to the problem since im just trying to have the camera in fixed place when the default "character select pawn" is spawned

#

it works fine on the server

#

and with a delay

#

ok so i found a solution, i used the event "OnBecomeViewTarget" i have no idea where this is being called in code but it is clearly being called way after possesed or even tick, if some one knows the chain of calls that leads to this specific let me know cause it sounds usefull for the future.

nocturne quail
#

I can't play InteractionSound if SimulatePickupVisuals(); is a reliable Client RPC, but it works if I change it to NetMulticast.

  • What can cause it?
void APickup::Interact_srv(class ASurvivalCharacter* Taker)
{
    if (IsPendingKillPending() || !CanInteract(Taker)){
        UE_LOG(LogTemp, Warning, TEXT("Interact_srv::404"));
        return;
    }

    const FItemAddResult AddResult = Taker->GetInventoryManager()->TryAddItem(Item);

    if (AddResult.ActualAmountGiven < Item->GetQuantity())
    {
        Item->SetQuantity(Item->GetQuantity() - AddResult.ActualAmountGiven);
    }
    else
    {
        if (PickupCollisionSphere)
            PickupCollisionSphere->DestroyComponent();

        if (InteractionComp)
            InteractionComp->SetActive(false);

        SimulatePickupVisuals();
        SetActorHiddenInGame(true);
        SetLifeSpan(1.5);
    }
}

void APickup::SimulatePickupVisuals_Implementation()
{
    if (InteractionSound)
    {
        UGameplayStatics::PlaySoundAtLocation(this, InteractionSound, GetActorLocation());
    }
}
nova wasp
nocturne quail
#

and passing self

nova wasp
#

I guess what I mean is which side of the network calls it

#

this is networking related

nocturne quail
#

character calls Interact_srv using a server rpc

nova wasp
#

it being a server rpc describes what kind of rpc it is, not who calls it

#

leaving out context here is not helpful

#

the kind of rpc changes what it does based on the ownership of who calls it

nocturne quail
#

server reliable rpc in character class doing a line trace and calling Interact_srv from a detected pickup item passing self

nova wasp
#

did you describe this being from client or server earlier or what

#

the KIND of rpc it is and which side calls are are two distinct pieces of information I refuse to assume

#

I would assume you want to call a server rpc from a client that owns the character

#

but I cannot see that

#

so so the client picks it up, sends the server and RPC saying it did

#

and the server emits an rpc saying to play the pickup sound to everyone else (other clients etc)

nocturne quail
#

if I change it to netmulticast, it works

#

but I wan to use a clean cilent rpc to just play sound for the owning client

nova wasp
#

well

#

since the player does not own the pickup

#

I do not see how it would be a valid client rpc

nocturne quail
nova wasp
#

you can see the chart here shows what happens in each case

#

which client would it send this to if nobody owns it?

#

so multicast sends it to everyone including whoever happened to pick it up

nocturne quail
nova wasp
#

it could just be a component on the playerstate or player controller, pawn whatever

#

you don't need to have all of your client/server back and forth rpcs in one place

#

you can see epic kinda slamming it all in one place in the playercontroller header though lol

#

there's even a dedicated ClientPlaySound rpc in there (no reason to not make your own though... I would prefer to control this myself)

nocturne quail
nova wasp
#

arguably all they need to know about is the item asset type or instance and the item could just tell it what sound is interesting to play (if any)

#

it would make more sense to me for this to be an event from the inventory item being added

#

than a distinct rpc

#

but since this probably doesn't happen often and if this is easier to get going its probably fine

#

it seems a bit questionable to make just a visual/auditory effect reliable in some ways too but if you think it's bad to miss you don't want to miss it

#

so up to you

nocturne quail
#

each pickup will load its single sound from assets and play

nova wasp
#

there isn't much difference between sending a sound asset and an item asset (class path I assume?) but ideally the one with less unique values will result in less full paths sending?

nova wasp
#

If the pickup knows what the sound is why can't it just be local anyways

#

So the RPC says "play your sound" and the item instance actor knows which one to play (or loads it etc)

nocturne quail
#

there hundred of copies in the level of the pickup placed of each type

nova wasp
#

so?

#

Doesn't mean it doesn't know what it is

nocturne quail
#

I use FString Path insted of USoundBase* in each pickup

nova wasp
#

If you want to talk about doing stuff for perf reasons my first thought would be to not use actors I guess lol

nova wasp
#

that sounds like a soft class/asset path with extra steps

nocturne quail
nova wasp
#

if it works it works

#

but in my mind you could make this much faster with a buffer of lightweight ism instances per cell that have a fast array like some simple network manager

but it would be not ideal if these move a lot or have unique replication data per class... also this will take a while to make vs just a simple actor

#

so don't bother with that unless you are seeing spikes from there being a ton of actors to make

#

I would say at the very least I would hope they aren't all spawning in in 1 frame (you may need to in some cases but I think it's probably possible to slice a lot)

nocturne quail
#

hmm, yeah

nocturne quail
nova wasp
#

also more network objects = more potential polling if network dirtiness is not handled well with pushmodel stuff

nocturne quail
#

each spawn has a random delay from 3 to 6 sec

nova wasp
#

that sounds good, you should be chilling then perf wise

#

random is a bit silly when it could just do N per frame from a buffer but if it works it works

nocturne quail
#

game can reach +1k FPS if not limited to some amount ๐Ÿ˜„

#

and at 40fps it runs smoothly like butter

nova wasp
#

client and server perf are distinct issues

nocturne quail
#

yeah, it was an issue in an intense fight when my 50 friends starts shooting at each other, bullets spawning was very performant

#

I changed it to bullet pools

#

now its fine

#

now when a client equips a weapon, 5reserved projectiles are spawned in the weapon and they re used if the mag has ammo

#

proper loading screen

#

should run in its own thread to avoid freeze

nocturne quail
#

also implemented error message logging on client screen showing reason why can't they pickup this item

tardy fossil
#

i just noticed replicated movement uses replicated variables/onrep... wouldn't the reliable nature of replicated variables introduce uneeded overhead? especially with something changing as often as position? or is it not enough to matter

silent valley
tardy fossil
#

ohhhh ok, yeah that makes sense

gritty nebula
#

Hello friends im making a trebuchet and i want an ammo type to be a multishot ammo which shoots like 4 projectiles instead of the standard 1.

Im wondering if its better in this case to have each projectile be its own actor OR have 1 actor and each projectile will be a component with its own physics. So in this case 4 projectiles means 1 actor with 4 sphere components or something.

Would appreciate a recommendation!!! Thanks!!

silent valley
bright summit
#

sanity check: if actor is dormant in network profiler waste should be 0? Because I am setting dormancy for an actor and waste is still 99% ๐Ÿ˜„

#

(using push model btw)

#

When I set only relevant to owner the "Update HZ" is equal which is set in Actor Frequency, but when when only relevant to owner is off, update hz is nearly 0

#

with SetNetDormancy(DORM_DormantAll);

exotic wasp
exotic wasp
#

but "waste" might not mean what you think for an object doing nothing

bright summit
#

that was what I wanted to ask for

#

not Waste

#

and it seems that when Only Relevant to owner ignores the dormancy ๐Ÿค”

bitter remnant
#

I have a problem, that UAnimNotifyState::NotifyEnd is called every frame, after UAnimNotifyState::NotifyBegin was called.
But it seems, this only happens on the server.
I start the montage through a GameplayAbility
It doesn't matter, if I don't run the montage on the client

bitter remnant
#

I debugged and ActiveAnimNotifyState is empty almost every time.
I made a breakpoint condition on HasAuthority

halcyon ore
#

This is just a tiny curiosity, for one of those like It saves like 0.00001% performance
But, does the server calling a server replicated event/ function.
Make it go through extra hoops, or does it know that the server is calling a server event, and turns it into a normal function call?

nocturne quail
# exotic wasp Did you end up going with physical bullets using collision or a custom ballistic...

The Object PoolPattern:
Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!

This video goes over the Object Pool Pattern which is used to optimize performance and memory by reusing objects in your game.

Download the project files and support my ...

โ–ถ Play video
nocturne quail
#

what I only changed is , when the character equipped a weapon, spawn pool for this weapon, and when unequipped, destroy the pool

teal mantle
#

Hello, Im working on a survival multiplayer project messing around with replication and I dont know much about it but the best way for me to learn is to do so
So Im working on a modular attribute system for the player how it works

call modify attribute event from anywhere (not replicated)

switch has authority

3 if authority calls the internal function

if not calls server event then calls said internal function

fossil spoke
#

Im confused.

#

If you are doing attributes, you should probably research the Gameplay Ability System plugin.

#

GAS already solves this for you.

teal mantle
kind star
#

Reading up on "flipping" a replicated variables condition between "Owner_Only" and "None"

I would like to ideally have a "inventory" struct replicate to owner only normally. And when an actor dies, it replicates to all so clients can see what items can be looted.

Is this possible in C++? Seems like people have tried but failed to make it work properly.

thin stratus
#

In theory this is only used for changing Replication Settings in a child class.

#

Because you aren't allowed to call DOREPLIFETIME for the same property twice.

#

Although I'm half sure RESET_REPLIFETIME_CONDITION doesn't do anything special that wouldn't be possible to handle in DOREPLIFETIME, but that's a choice by Epic.

#

The problem you have is that it requires the OutLifetimeProps.

kind star
#

Thanks Cedric. Yeah that's what my digging through the engine code was pointing towards, but it didnt seem like a properly catered for use-case

thin stratus
#

Yeaaaah, I mean.... I wonder if you could just call GetLifetimeReplicatedProps by hand.

#
void ASomeActor::ChangeRepCondition()
{
  TArray<FLifetimeProperty> OutLifetimeProps;
  GetLifetimeReplicatedProps(OutLifetimeProps);

  RESET_REPLIFETIME_CONDITION(ASomeActor, SomeProperty, COND_None)
}
#

Pretty sure there is more to it

#

Cause GetLifetimeReplicatedProps would just collect new ones.
Must be a way to get and update the original ones. hm.

#

Honestly, a better approach might as well be just keeping the Inventory as COND_None and putting it onto the PlayerController by default. And once the player died, moving it to the PlayerState/Character.
Or, have it on its own Actor that overrides IsNetRelevantFor, and have it COND_None there, and return if it's relevant for a given Connection via IsNetRelevantFor based on the owner being Dead or not.

kind star
# thin stratus Honestly, a better approach might as well be just keeping the Inventory as COND_...

Yeah, I think I'm going to go for a bit of a caveman approach of using two replicated variables, one with no condition and one that has a owner-only condition.

  • Use the owner-only one as a "private" inventory for locally controlled client updates
  • Use the no-condition one as a "Public" inventory which we use as needed, i.e. a character dies, lootable items

Then two relatively simple on rep delegates With server calls for handling local Listen servers to hook in the UI

#

Was trying to be a smart ass and just use one replicated struct and just toggle its replication condition

exotic wasp
thin stratus
kind star
#

Oh I didn't know it was being phased out, haven't heard of Iris, hope it has a UI MochiSmile

hollow isle
#

I'm trying to get OSS Steam setup using the 481 Spacewar test Steam ID.

When I send an invite to friends they don't join my session but it works when I'm testing myself with multiple standalones. Do I need to get an ID for it to work?

bright summit
#

what your log says when friend tries join the game

hollow isle
latent hamlet
#

@pallid mesa Hi there! Have you tried to make network physics work for the case when I have a APawn (owned by client) and AActor, both with network components, and I want to apply some force to AActor from APawn? I didn't manage to make it work on client yet
I have tried to do it like that:

  1. APawn selects AActor to work this, sends request to the server to SetOwner(GetController()) and SetAutonomousProxy(true) to AActor;
  2. NetworkComponent on AActor sets SetIsRelayingLocalInputs(true);
  3. In tick() APawn sends FVector to AActor
  4. In tick() AActor uses this FVector and put it into AsyncInput

I wonder do I miss some important bits here, for now forces are applied on a client, but not on server, so the body gets corrected back to server's position

hollow isle
lament flax
#

iirc fast arrays aren't supported by the push model ?

bright summit
hollow isle
#

5.7 and AdvancedSteamSessions

bright summit
#

Are u using steam sockets? if not, you should because in +5.6 without it advanced steam sessions do not work

hollow isle
#

I have steam sockets enabled in plugins

#

Google AI Overview says:

Using Advanced Sessions with Steam Sockets can be challenging due to potential conflicts, and it's often recommended to disable the Steam Sockets plugin to get the Advanced Sessions plugin working for basic Steam session functionality, especially in older versions of Unreal Engine. If you do enable Steam Sockets, you will need to manually configure your engine to use the SteamSocketsNetDriver in DefaultEngine.ini to avoid issues.

bright summit
#

eh

hollow isle
#

Thanks I'll read this

bright summit
#

you must change your network driver to steam sockets

#

and next time do not belive into AI overview shit

#

xD

hollow isle
#

This is in the DefaultEngine.ini:

[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bRelaunchInSteam=false ; Generally false for testing in Editor/Standalone
bInitServerOnClient=true
GameServerQueryPort=27015
bVACEnabled=0
GameVersion=1.0.0.0

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
bright summit
#

yeah, you don't use steam sockets

#

change it as pointed in the docs and it should start working

thorn hornet
#

I've read through the Multiplayer Network Compendium (great resource!) on cedric-neukirchen.net.
One thing I'm trying to understand how to implement, is the scoring system. It seems like I'd want to update an individuals score in their playerstate.
What's the correct way to have an object send a player reference to have points added to their score? "Get Player state"? Or, get game state and implement a function in there?

dark edge
#

????? big chain of stuff ?????? -> on server, some authoritative stuff happened that is scored -> number go up

#

What's the context here, when and why does score go up?

thorn hornet
#

An example maybe from my end. A piece of fruit. On collision or when player steps into it. Originally, I had the fruit get a component from the player, which had a function to accept a point increase. Then, the players total increases and the fruit removes itself from the game.
Total player score is held in the players character. Is there a way to move this so that the fruit collected somehow notifies something other than the player? I was thinking, notifies the 'server' that player X got it, and then the server does checks, and updates score as needed?

#

Very simple start. Rather than a component in the actor handling it, I'd want it to be handled somewhere else? Or am I overthinking it?

#

New total and success are just there for now until I decide how I want to handle everything.

thin stratus
#

@thorn hornet So, this isn't really a multiplayer problem, at least not mainly.

#

The Score should probably live in the PlayerState.

#

Your trouble is "How do I get the PlayerState when it's the PlayerCharacter/Pawn that overlapped?", I assume.

#

You usually handle the Overlap (or the Interaction for example) inside the Actor that the Player overlapped (or interacted) with.

#

In there you usually have a reference to the PlayerCharacter/Pawn. Overlap naturally has it due to the OtherActor pin (interaction requires you to pass it along).

#

To ensure that you always take the correct PlayerState, you need to stay "relative" to the Player Object you currently have. In this case the PlayerCharacter/Pawn.

#

On that Pawn, you can call "GetPlayerState", which returns the PlayerState of the Player that controlls that Pawn.

#

(if that Pawn is possessed, etc. etc.)

#

That PlayerState you can then cast to your own child class and call AddPoints on.

#

The Multiplayer part of this is relatively small. The important thing is that almost none of this should happen on the Clients, which is why I said originally that it's not really a Multiplayer problem.

thorn hornet
#

Yeah, this is my first dive into multiplayer stuff. Trying to wrap my head around it all. I'm a pentester / hacker by profession, so I find myself worrying about the 'security' and authority stuff. I felt like the fruit calling the function in the component of the pawn, would be less authorative or could open the game to some form of cheating. Vs something like "telling the server". But, I was thinking maybe I hadn't fully understood the authority parts of your write-up

thin stratus
#

For the Overlap case, you have an easy life, because the Overlap is supposed to happen on Server and all relevant Clients. That happens naturally because the PlayerCharacter/Pawn literally moves into the collision on each relevant Client and the Server due to it being replicated in the first place.

#

Which means the BeginOverlap can simply be guarded by "SwitchHasAuthority", so all of the stuff behind it only runs on Authority, which in this case would be the Server.

#

After that you can grab the PlayerState, increment the Score and destroy the Pickup. The Score would be a replicated variable so everyone gets the right value replicated back to them for that player.

#

The Pickup would be a replicated Actor, so the Destroy call by the Server destroys it on everyone.

#

For the Interaction case, that I'm only taking about due to the image you've sent, you need to ensure that you call a ServerRPC in the PlayerCharacter/Pawn (or a Component on it, depends on how you set this up) that simply tells the Server that the Player wants to interact. After that, the Server can do the Line Trace, or whatever else you are doing for Interaction, and call OnInteract on the Pickup, passing the Instigator (PlayerCharacter/Pawn) along. Inside the Pickup you then do the same thing: SwitchHasAuthority (for sanity) -> GetPlayerState from Instigator Pawn -> Cast -> Increment Score -> Destroy PickupActor.

thorn hornet
#

Reading / trying to digest and understand.
Very much appreciate all the information!

thin stratus
#

It's relatively important that you keep Server RPCs rare and only use them to communicate information to the Server that the Server doesn't know about already or can't figure out itself.

In cases such as Interaction, you would only send an RPC when the Interact Key is pressed/released, as all the other stuff can be figured out by the Server.

thorn hornet
#

Going to tinker some and see if more questions come up.
Thank you!

bold shell
dark edge
#

does transfer item work without the drag and drop? If you just hook a debug key up to transfer an item from A to B, does that work? Does it update the UI when you do that?

#

make sure the underlying logic works before the UI layer is placed on top

#

press button to move item, press button to empty entire inventory on the ground, etc

bold shell
bold shell
#

should the referances to the inventories be replicated or just the inventories t hemselves

dark edge
#

if inventories themselves are replicated than the server doesn't care about anything besides the drop. The drop is when you send a transaction request RPC

#

drag from inventory widget and drop in world -> "I want to drop item X from inventory Y"
drag from inventory widget and drop in another inventory widget -> "I want to transfer item X from inventory Y to inventory Z"

vivid siren
#

Anyone here have any insight on Mover / Chaos Mover and how one-shot events should be handled?

I have seen some examples where jumping is handled via two bools (bIsJumpPressed and bIsJumpJustPressed), and I've also seen it handled via one integer (JumpCount).

I believe this is because there used to be issues for some devs, where the replication backend might miss the temporary boolean changes.

bold shell
echo pasture
#

in a seamless travel, is there any chance the game mode will call StartPlay before all connected player controllers have called PostSeamlessTravel

thin stratus
nova wasp
#

ah, seems this is tracked in AGameMode::NumTravellingPlayers

#

so I presume you could just wait on that being 0 with some timeout etc

echo pasture
#

But I have a timeout in my code, and when it hit the timeout it starts the game anyway, and oddly enough, suddenly all the players are there

echo pasture
#

oh I'm a loser idiot

#

timeout was set ultra early

nova wasp
#

no need to be so hard on yourself lol

echo pasture
#

oh I'm joking dw

nova wasp
#

I think I tend to not like using a timeout but given how much is going on here that I do not understand I think a timeout seems okay

echo pasture
#

yeah same

nova wasp
#

like if a client gets stuck in between does it just boot them after not getting any packets etc

#

no clue

echo pasture
#

wish I knew as well

#

could maybe glean something if you inspected AGameMode::InactivePlayerArray?

#

which is the array of player states when a player disconnects

bitter remnant
#

I have a problem, that UAnimNotifyState::NotifyEnd and UAnimNotifyState::NotifyBegin are called every frame, after UAnimNotifyState::NotifyBegin was called.
But it seems, this only happens on the server.
I start the montage through a GameplayAbility.
It doesn't matter, if I don't run the montage on the client

I debugged and ActiveAnimNotifyState is empty almost every time.
I made a breakpoint condition on HasAuthority

nocturne quail
#

I am avoiding killing a character until the server says so, even if its health dropped below zero in the clientโ€™s game state.
but I am getting in to an issue where if the other character used a first-aid kit just before receiving a deadly attack, but the server don't know about it yet because of latency ?

killer has 30ping
victim has 130ping

server will listen first to the 30 pinger!

tardy fossil
#

could give the healing a bit of a delay or something if you're trying to predict health going up when using a med kit client side

#

then the client wont see their health go up and then be killed and feel cheated

nocturne quail
#

between this event when client finished using the item and server not, and got killed by someone they will definitely feel like cheated

#

if the death is delayed, the killer will feel like victim cheated ๐Ÿ˜„

nocturne quail
#

this article talking about the exact issue that I have currently
https://copyrat90.github.io/2025/04/05/fast-paced-multiplayer-2.html

exotic wasp
#

you could do something similar with rollback kinda like what you do to verify gunshots

lament flax
#

how can i freeze the CMC (ignore movement input) and restore the velocity/acceleration afterwards ?

#

its hard to find how exaclty the Velocity is increased over time

crimson garden
#

Hey, is there any recommended way to replicate a physics handle mechanic? My current implementation works, but the client sees a slightly laggy movement of the grabbed object. It doesnโ€™t stutter, but itโ€™s noticeably delayed and kind of โ€œfloaty.โ€ My logic right now is that I call SetTargetLocation on the client on the tick and also call SetTargetLocation with the same location through the server on all clients. On the server the movement of the held object is perfectly smooth, but on clients itโ€™s a bit off.
Maybe you guys have any tips for this kind of implementation.

brave yew
#

Hey! Is it possible to use level streaming with p2p multiplayer? I am using a blueprint interface to interact with a manhole, and once done trying to teleport the player underground and load the level on the client side. I got set visibility working on either the host or the guest but not both. Any tips would be appreciated

lament flax
#

its local so you gonna run it propery on server/client

#

also, what solution are using for p2p in UE ?

brave yew
brave yew
exotic wasp
#

If the level that gets loaded name is the same, actor replication will work

#

I've always done it with an OnRep property that holds level information

#

So when the server loads the level and adds the data to the array, it replicates to the client, and the client responds by loading it themselves

brave yew
#

Then wouldn't it be replicated to all clients?

exotic wasp
#

Not if you control who it replicates to

#

Something that is Owner only would work

brave yew
#

Hmmm so how would i go about doing that? Right now i have a custom event with server replication and another with multicast for most interactive objects.

#

Sorry if this is very basic, haven't touched multiplayer much yet

exotic wasp
#

Could shove the array property in PlayerState and make the property replication condition OwnerOnly

#

I'm not sure that normal arrays can get a per element callback so you might have to use a fast array. Not sure if that's changed recently

brave yew
#

Would it otherwise be possible to have all the levels loaded on the server and change the visibility/unload client side only?

exotic wasp
#

Server will always have the level loaded. You can change visibility on the server and it will hide it from clients, I think

#

But things in those levels will probably still replicate

brave yew
#

Oof i think I'm a bit out of my depth here

exotic wasp
#

It's not as bad as you think

mystic estuary
#

Hello, does anyone know why the object might be doing this weird movement? It looks like Simulate Physics is what makes it do that. As a quick workaround I disable physics for a second for it to snap in place, but I'd like to see whether there's a better solution

nocturne quail
#

how did you attached?

mystic estuary
nocturne quail
#

if it works it will be easy to debug further

nocturne quail
#

disabling it could solve it for this cube actor

lusty timber
nocturne quail
#

just attach by server

lusty timber
#

Does that remove jitter to passenger?(non possesser)

nocturne quail
#

and those properties should be set by multicast, some of the variables are not replicated in those properties

lusty timber
nocturne quail
# lusty timber Can you elaborate what are those? I'm kind of intermediate in unreal engine

once you attach character to vehicle by server, in the same frame call a multicast function.


multicastfixJitter_implementation()
if (HasAuthority())
{
    CharacterMovement->DisableMovement();
    CharacterMovement->StopMovementImmediately();
}

CharacterMovement->SetMovementMode(MOVE_None);
CharacterMovement->bIgnoreClientMovementErrorChecksAndCorrection = true;

//Reduce network smoothing to minimize jitter
CharacterMovement->NetworkSmoothingMode = ENetworkSmoothingMode::Disabled;
Target->bUseControllerRotationYaw = false;
Target->bUseControllerRotationPitch = false;
#

target is the passenger, not driver

#

driver is pocessing the vehicle it has no jitters

#

jitters only apply to passengers because vehicle controller is trying to override rotation/location of the passenger controller

#

this is why you need to disable those jitters on passenger

lusty timber
nocturne quail
#

these should be on server

if (HasAuthority())
{
CharacterMovement->DisableMovement();
CharacterMovement->StopMovementImmediately();
}

#

in a multicast add a sequence node

#

in the first pin check if server, connect them

#

second pin should the rest of the properties on server/client both

#

when you call multicast on server it will be called on server and all clients, so you can check if server or switch has authority

lusty timber
nocturne quail
#

sure, just let me know how it goes

#

I fixed my jitters on the same approach

#

for you it should also work

lusty timber
nocturne quail
lusty timber
nocturne quail
#

and others will also be able to help you if the issue not resolved

lusty timber
#

non possessed player attached to other actor jitters

tardy fossil
#

my world is made almost entirely of replicated actors, i set the initial net speed of players pretty low so the initial replication doesn't saturate.. but im having a hard time figuring out when the initial actor replication has finished for a client... i guess theres no straightforward way to do that huh? one idea i have is to have the server replicate the number of actors and on the client side increasing a counter in AActor::PostNetInit but that seems a little janky

#

or maybe the client can loop over all replicated actors and check to see if they have all begun play.. that seems a bit easier

nocturne quail
keen slate
#

Hi there, just forwarding a question from cpp channel:

What is the current progress of the Mover plugin wrt multiplayer? Is is stable? Which engine version is required?

Anything that can make us get rid of the heavy CMC ๐Ÿค—

thin stratus
# keen slate Hi there, just forwarding a question from cpp channel: What is the current prog...
  • Epic works on Chaos Mover. Not sure how far that is, but given the recent commits they are still fighting with it
  • NPP Mover I have no clue. We are using it but our NPP and Mover are both !heavily! changed. I did see they recently added Iris support to NPP, even though that looked a bit... well let's just say it could be done better...

In terms of features for Mover itself, I'm half sure it's still lacking a lot of the battle tested stuff that CMC has.

So you can basically try NPP Mover or Chaos Mover and in both cases you should be prepared to:

  • Fight bugs.
  • Reimplement features that CMC has.
  • Probably perform "engine" changes (you can pull the plugins into your project's Plugins folder fwiw, so they replace the Engine ones, but that's still an engine change down the line, given you have to merge new stuff in).
#

If you are comfortable to patch NPPMover/ChaosMover in C++/custom Engine and you want to trade that against the heavy CMC, then you can go for it. Having worked with NPPMover for so long and followed the commits on Mover and NPP, I would if at all go with Chaos Mover, but most likely continue to use the CMC.

#

You should probably also ask yourself why you even want to use Mover instead of CMC. Mover isn't necessarily cheaper depending on what you are doing. Epic is adding tracing into ChaosMover in commits with messages that suggest that they are trying to figure out why it's expensive. And NPPMover is certainly not cheap or cheaper. NPPMover has this little "one backend for fixed tick simulation" bait hanging around and that might also work for a lot of peeps, but if that's a key requirement you might want to check if NPP actually covers what you need and doesn't have hidden pitfalls. And ChaosMover has the "everything under one physics simulation" bait, which is potentially worth more, but multiplayer physics are a beast to tame and Epic is still working on that.

keen slate
#

Our profiling suggests that CMC is the main performance bottleneck in our game. I have not used Mover before, and just want a quick overview if it's worth the time invested to set it up - I wouldn't do that I think if it's too unreliable

#

For reference, our game is a top-down 3d shooter with flat/light-bumpy terrain. For all intents and purposes, the collision shapes could be represented by a circle projected onto the ground.

glossy wigeon
#

If I want certain actors only available on certain clients I do have to implement IsNetRelevantFor for them right, there is no way around that?

#

Nothing global or so, so that not every actor needs to inherit from a custom class.

dark edge
#

there's 3 views here.
What the owning client sees, what the server sees, and what other clients see.

crimson garden
dark edge
#

You have a predicted thing "carrying" a non-predicted thing

crimson garden
gritty warren
#

Was checking out the new GASP 5.7 update, and I was curious about montages / sliding.

The livestream suggested that 'it just worked', but I'm finding all sorts of issues not present in the CMC. I've attached a video of one example. This will also happen with the montages - the client cannot handle it.

Anyone know of any settings I might need to change / modify to get it to work well, or is it just broken still?

#

this is on average latency. I wouldn't expect the client to freak out so much though (top left corner - it's teleporting all over the place, though it looks smooth to everyone else). I am not sure why the client would have such a fundamentally different result from the server, I wouldn't expect the prediction to be so off.

#

Particularly in this circumstance where you're not bumping into anything. In those contexts, CMC can have like no net corrections even at like 500 m/s

gritty warren
#

simulated proxies look slightly less jittery, like you can tell they're jittering on the server but a smoothing is applied somewhere

sturdy swallow
#

Hey folks,
I am trying to understand the Actor roles.
My understanding about dedicated server setup (Like valorant, dota 2) is shared in the screenshot. This also correlates to the official documentation on Actor Role and Remote Role

I am not sure how the roles work in a Listen server setup (Like minecraft, left for dead, etc) where let us say Player 1 is hosting the game.

Can someone explain or point me to a good resource?

Epic Games Developer

Determine how much control this game instance has over an actor in Unreal Engine.

#

This is my educated guess but I have no clue what the roles will be for the player 1's character in the Host machine.

thin stratus
#

Player 1 on Host will be authority for both roles iirc.

#

But you can just print them fwiw. Also keep in mind that you are listing this stuff for possessed pawns/characters. Clients usually have SimProxy for their role. AutoProxy is mostly only found for said pawns/characters.

sturdy swallow
#

Hehe, I know that I can print it. It's just that the computer I have available to me at the moment cannot run unreal so I am diving into the character movement component using unreal's source code in github. My choice is waiting until tomorrow to perform this test when I'll be at my PC or ask here.

#

Both local and remote role being ROLE_Authority in the host machine makes sense to me.

kindred widget
sturdy swallow
#

No, It's a Macbook M1 Pro. Unreal's PIE runs at 10 fps in it so I never install it in this.

thin stratus
#

Cause for testing code, you don't need any fancy graphics.

#

If it runs 10FPS on a fresh project, then there might be a world where it runs 30-60FPS if you turn expensive render features and the overall quality off/down.

nocturne quail
#

since tmap is not supported for replication

    UPROPERTY(Replicated)
    TMap<EWeaponAccessorySlot, class UAccessoryItem*> Attachments;

error : Replicated maps are not supported.

should I use replicated TArray of structs ?

UENUM()
enum class EWeaponAccessorySlot : uint8
{
    Sight,
    Muzzle,
    Grip,
    Magazine,
    Buttstock,
    Foregrip,
    UpperRail,
    LowerRail,
    MAX
};

USTRUCT()
struct FWeaponAttachmentSlot
{
    GENERATED_BODY()

    UPROPERTY()
    EWeaponAccessorySlot SlotType = EWeaponAccessorySlot::None;

    UPROPERTY()
    class UAccessoryItem* Accessory = nullptr;

    bool operator==(const FWeaponAttachmentSlot& Other) const
    {
        return SlotType == Other.SlotType && Accessory == Other.Accessory;
    }

    bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess)
    {
        Ar << SlotType;
        Ar << Accessory;
        bOutSuccess = true;
        return true;
    }
};

UPROPERTY(Replicated)
TArray<FWeaponAttachmentSlot> Attachments;
thin stratus
#

should I use replicated TArray of structs ?
Yes. With the note that, depending on what you are actually replicating there, you should not only use a TArray but a FastArray.

nocturne quail
nocturne quail
#

still I need fast array?

thin stratus
#

No, it's more about per element replication. If your Array and Struct are small, then a TArray is fine. But, for example, an inventory can definitely benefit from a FastArray.

thin stratus
# nocturne quail since tmap is not supported for replication ```hs UPROPERTY(Replicated) ...

btw, the habit of using a TMap solely due to it mapping a Key to Value isn't necessarily good. For small counts of elements, the hashing of a TMap Key is probably more expensive than looping over a TArray.

If you want to keep the simplicity of throwing in a Key and getting a Value back, TArray always offers FindByKey and FindByPredicate.

FindByKey requires you to have an operator== that takes in the KeyType you want to find by. In your case, EWeaponAccessorySlot.

FindByPredicate allows you to find an entry based on whatever context you are in right now, if that makes sense. So it's a bit more dynamic, since you don't necessarily have to pre-plan your struct with an operator overload, cause you just write a lambda that compares one or more properties of an entry of the TArray to whatever you capture (which is what I mean with context I guess).

nocturne quail
thin stratus
#

Yeah, you aren't alone with that thought. TMap is really useful, but I do see people "overuse" it for tiny lists, mainly for the Key <-> Value mapping, while TArray can offer the same, potentially cheaper due to HashFunctionCost > ArrayLoopCost.

#

The worry about duplicated entries is fair, but you combat that by keeping the TArray private: and exposing functions to add/remove elements to it. That way you can always check if the entry exists already.

#

Pretty sure there are more "ByKey" functions too that might be useful.

#

TArrays are also pretty versatile in terms of what container they actually are. Like you can HeapPush and HeapPop etc. on a TArray and use it as a Heap with a sorting function.

#

ElementType * FindByKey ( const KeyType& Key )
SizeType IndexOfByKey ( const KeyType& Key ) const

Relatively sure Contains should accept the Key too if there is an == operator for it.

#

And if in doubt, you can always use the ByPredicate versions and just wrap them into your own functions in whatever class holds the TArray.

nocturne quail
nocturne quail
nocturne quail
thin stratus
#
struct FAttachmentData
{
  // [...]

  bool operator==(const EWeaponAccessorySlot Slot) const
  {
    return SlotType == Slot;
  }

  // [...]
};
const FAttachmentData* const FoundAttachmentData = Attachments.FindByKey(Slot);
return FoundAttachmentData ? FoundAttachmentData->Attachment : nullptr;
#

Wrote that just here into Discord, so might have typos or so.

#

FAttachmentData is FWeaponAttachmentSlot? Not sure if you renamed that.

nocturne quail
nocturne quail
#

when you call attach function check if local->attachtofppmesh else attach to tppmesh

#

better use one tpp mesh, just move camera when you are in fpp mode and attach the camera to player head socket

#

this way you will avoid the hassle of dealing with two meshes

thin stratus
#

If you can use C++, then the Actor approach is probably the simplest.

#

The native Attachment replication will try to attach it to whatever the Server did, so without C++ access to override that behavior, it is a bit nasty.

#

If you can't use C++, you might be better off keeping the state of the Weapon still in an Actor, but handling the Attachment with predefined Components on the Character.

So once equipped, you pull the SkeletalMesh, potential Material overrides, AnimBlueprint, etc. out of the WeaponActor's Data and assign them to the pre-spawned/attached Components on the Character. Means the WeaponActor itself won't really have any visuals.

Could probably also get away with spawning the Components runtime, just gotta be careful with runtime spawned stuff if it has to be net-addressable (aka if you need to pass it through an RPC).

There is probably even a world where your Weapon could just be a DataAsset and the WeaponActor is replaced by a runtime spawned ActorComponent for the State, but at that point it gets a bit too fancy and you might be better off just learning the small part of C++ to do that replicated Attachment change x).

#

Then use the Actor + override OnRep_Attachment or whatever it's called.

unkempt lodge
#

For my ue5.7 project, Would you guys recommend switching to Iris if i can on my current project, or should I wait 5.8 to be sure its stable ?

nova wasp
#

just use owner no see and only owner see

#

view targets already do all the work for you here

I would suggest not creating a first person mesh for things that are never the view target though

nova wasp
thin stratus
#

That doesn't fix attachment

#

OwnerOnlySee/OwnerNoSee only really works if they go the SkeletalMeshComponent on Character way.

nova wasp
#

yeah I guess to add to that you want a weapon mesh that is build for both sides (1p and 3p) that just share the same source information of what is on it

#

and just... update it

unkempt lodge
# nova wasp no context = stick with the default

I guess i just want to use the latest available tools but yeah i don't have a real reason to switch. It's just so i prepare myself for future updates but if the migration is too heavy i'll just skip it

thin stratus
#

That's where you gotta override the OnRep_Attachment stuff

unkempt lodge
thin stratus
#

No, the Weapon.

nova wasp
# unkempt lodge I guess i just want to use the latest available tools but yeah i don't have a re...

the main and most important migration cost will be if you

  • use custom netserializers (they should be turned into iris serializers which are quite complicated to write... not sure if the last resort fallback works for user code yet)
  • use replication graph (it is gone)
  • replays are gone (complicated but generally speaking they do not work the same)
    main real reason to switch earlier
  • have a lot of replicated objects or connections and need better perf now
thin stratus
#

Nothing. You leave it blank, because that's what otherwise causes every Client to do what the Server did.

#

Instead, you attach manually in whatever OnRep you have that defines if the weapon is equipped.

#

E.g. if you have Character::OnRep_EquippedWeapon, then you do it there.

nova wasp
#

generally speaking in my mind the weapon actor being a distinct replicated object is not meaningful unless you want to add random stuff to ever weapon

generally speaking clients only need to know about what the weapon should look like and the rest they can derive from which way the character is looking and if they are firing

thin stratus
#

Yeah, there you can do IsLocallyControlled -> Attach to 1P Mesh, otherwise 3P Mesh

nova wasp
#

not correct if they need shadows

#

3p might still be needed for cohesive self shadows

thin stratus
#

Correct, but they are also not offering that info. :D

#

UE also has the First Person View stuff by now.

nova wasp
#

I never said to never use an actor

thin stratus
#

You ultimately gotta choose yourself, tbh.

#

You can absolutely overengineer this if you want to.

nova wasp
#

my point is to not bother replicating a distinct object if you don't have good reason to (or if you just think that's more simple... you can do what you want lol)

#

to me it's less of a headache to just spawn the weapon actor for them locally based off of replicated state from the character actor (or a component on it or whatever)

#

why?

thin stratus
#

You can spawn a non-replicated Actor locally. But you won't get around having "something" keep replicated state.

nova wasp
#

it could just be a struct that the weapon gets given by something else

#

you can use variables to pass information between objects in c++

unkempt lodge
thin stratus
#

I can only say that if you have no specific reason not to just use a replicated Actor for your Item/Weapon, then I wouldn't bother engineering something else.

#

You can route RPCs through the WeaponActor, use Ownership to limit what gets replicated to it, and what not. You can always come back and change it if you want to later.

nova wasp
thin stratus
#

The comment about the 3rd person shadow is worth considering though.

#

Doesn't necessarily change anything about the Actor part.

nova wasp
#

does "working with Fortnite's 2017 weapon code" mean you are reverse engineering their project?

thin stratus
#

But the Attachment part would work differently fwiw, cause you kinda need both MeshComponents, where one is set to only render the shadow but nothing else for the local player.

nova wasp
#

okay I have no idea what else "working with Fortnite's 2017 weapon code for this" could imply then

#

I think they are referring to me mentioning that you might always need a 3p mesh + weapon to use as the character's shadow
#multiplayer message
this is generally done because first person "viewmodels" are kinda just floating arms

#

but you don't NEED to... you could just animate everything nice enough to never move the body around in weird ways or have floating arms

#

or you might not care about shadows

#

cool

thin stratus
#

Well if you picture your Character with a ThirdPersonMesh (UpperBody, LowerBody, Arms, Legs, Head) and FirstPersonMesh (Arms), and you think about attaching the Weapon, that has one single SkeletalMeshComponent, to either of them. And you then want that the local player sees their own full-body shadow, including the Weapon, you'll run into a problem :D

nova wasp
#

this is a very good way to learn Unreal stuff

thin stratus
#

If you don't care about the shadows, then the attachment replication stuff should be fine.

#

Valid.

glossy wigeon
#

If I want actors only be replicated to certain actors, do I use IsNetRelevantFor?
And can I change it dynamically?

#

Or is ther another way of doing it?

nocturne quail
#

the concept of 1p mesh and 3p mesh is so problematic when it comes to deal with both for cosmetics

#

in a single character class 3p mesh + 3p anim class + 1p mesh + 1p anim class ๐Ÿ˜„

#

this is why I use only 3p mesh + 1 anim class, and play with camera with magic

#

when it needs to hide some area of the character in 1p mode, just use hide bones function on local client thats all

#

and in your anim class blend by bool if 1pmode, blend 1p animations state

#

you only need one anim instance, you use two anim states in it

#

if 1p mode, locally set ip mode to true in anima class, so other player will your tpp animation and you will be blending 1p animation

#

your 1p mesh and tpp mesh using the same skeleton

#

just delete the 1p mesh and use 3p mesh for both modes

#

you hide bone by function which takes the bone name

#

hiding bone will hide the mesh part

tardy fossil
#

theres also the "copy pose from mesh" node that can be used in anim instances

nocturne quail
#

don't need to hide bone in anim class

#

you do it in your character class

#

nah

#

get mesh in your character class and call hide bone by name

#

than use a material with mask to hide this area

#

yes you can do it

#

yes it is, and having two meshes in the character class for player is a trouble and it an old approach

#

now you can play with camera and set its location or attach to any other socket on character

#

like for 1p, attach it to the head socket

gritty nebula
#

Hello friends. I am making a trebuchet right now and i have a problem with the projectile not looking smooth when its shot.

The projectile which is another actor is attached to the end of the trebuchetโ€™s sling. To shoot it the trebuchet swings its arm by playing an animation and releases the projectile actor by calling detachactorfromcomponent() followed by enablephysics. Heres the problem. When its released the projectile stutters a bit before going on its way.

Has anyone worked on something similar and knows how to fix? I think the problem might be how i attach the projectile to the sling so if anyone knows the correct way i should be doing this please let me know! Thanks!!!

#

P.S. the stuttering problem began when i enabled async physics tick, but i think i am doing something fundamentally wrong with how i attach the projectile actor to the trebuchet

thin stratus
#

Two meshes is in theory fine. Especially if their bone count is different. Client of mine does the same. They also have a first person body that reuses the third person anim instance.

#

Just stay away from the EventGraph in the AnimBP and use a common parent for the First and Third Person AnimInstance so you don't need to code things twice.

#

For hiding bones I'm pretty sure there is a built-in feature that doesn't need any scale or material tricks.

#

And then you can also look into Linked Anim Layers for the weapon specific animations, as that doesn't need to sit in the main anim instance.

vocal current
#

Imho you're better off having two character meshes for first person, because if your game has shadows you're going to need the 3P character in first person anyway.

#

Unless your game is one of those ones that takes the very realistic approach of "my 1P character doesn't have 1P specific animations, even it it looks weird in 1P" (e.g. a bodycam game). Or you're making one of those first person games that isn't really a shooter (think mirrors edge style parkour).

Because first person view model animations look extremely shonky when you see them from a third person perspective, and that includes when you look down and see your shadow. You don't want to look at your character's shadow and see that the clavicles are all warped up to be parallel with your head, and your arms are bent at an unnatural angle to frame the hands and gun on screen.

Unless you want to animate a dedicated camera bone, you also potentially have to deal with issues like the player's head bobbing up and down, giving a subset of users motion sickness. Since third person anims aren't going to keep the head still. Though you could probably mitigate that procedurally with Control Rig or something.

thin stratus
vocal current
#

Ahh I missed that

lapis pine
#

Trying to comprehend something here...
I have this simple Multicast RPC setup in an Actor Component attached to a player Character.

Why is it that the Print String never fires on clients unless the Multicast is set to "Reliable"?

e: Thanks for the thumbs up! An answer would be preferred, however.

strong junco
#

I have been making a project based on the first person template. I just noticed that if I put network emulation to average and rotate the player on the listen server, the simulated client sees a lot of jitter in the rotation. Anyone know what causes that?

glossy wigeon
#

Do you think it's work looking into Iris?
I'm currently trying to figure out how to replicate certain actors only to certain clients.
I've found that I maybe override IsNetRelevantFor or that the Replication Graph might also be a viable option and I'm wondering if I maybe want to look into Iris for that as well?

dark parcel
glossy wigeon
thin stratus
glossy wigeon
#

But maybe it's also me regretting, some time ago not trying mover and implement things with the CMC. ๐Ÿ˜…

#

But if it really won't work out, Iris is super easy to disable again.

thin stratus
#

I feel like Chaos Mover can be viable in 1-2 years. NPP Mover is more for the peeps that like to experiment and are fine with patching up an incomplete base at the momen.

nova wasp
thin stratus
#

It's hard to tell what Epic's plans really are tbh. But based on commit history, Chaos Mover is seemingly their focus.

#

Overall, I would probably never not recommened CMC to <generic multiplayer game>, given how absolutely battletested and feature-rich it is.

#

One thing I never see anyone talk about is the AsyncCMC code. I don't know if that's enabled by default, but the CMC has seemingly multi-threaded code in it by now.

nova wasp
#

AsyncCMC is a sort of forgotten side project as far as I can tell

#

basically they just copy pasted the entire cmc code into a new file

#

and made it sort of threadsafe and then tried to make the default cmc pass work to it

thin stratus
nova wasp
#

It's definitely going to be more simple to use something like chaos fixed tick mover in terms of threading

thin stratus
#

Metaphor of forgotten side projects.

nova wasp
#

it's a cool idea but it really makes it hard to search for cmc code lol

#

doing character sweeps in parallel is trivial to do but making it work well with interacting between other characters and game logic is not so simple

thin stratus
nova wasp
#

Chaos mover is using that afaik

thin stratus
#

The Fixed Tick part of Mover comes from NPP.

#

Not sure if Chaos has a fixed tick implementation internally.

nova wasp
#

uh

#

yes it does

#

that's entirely how most of the chaos replication scheme does stuff... it uses a fixed async tick for consistency

thin stratus
#

I'm still trying to find a proper frame number that client and server can agree on within Chaos to point to the same physics state.

#

Even CVD's setting to use that network frame isn't in sync.

nova wasp
#

that's kinda what the chaos replication plugin tries to do

thin stratus
#

The frame one can get from the system doesn't seem to work though :/

#

E.g. if you grab the transform of a Chaos Vehicle and that Frame and compare those on Server and Client, they won't line up.

nova wasp
#

grab it how?

thin stratus
#

It's been multiple weeks since I tried it. Can't tell you from the top of my head.

nova wasp
#

Chaos mover literally has a TSimCallbackObject in it in case you need code to look at

#

this is how things add ticking to chaos async fixed tick (there are others though)

thin stratus
#

It was meant for hit validation. For NPP it's easy. Sending the SimProxy Interp From and To frames and the Interp Prcentage to the Server as an AutoProxy leads to a pretty accurate state.

nova wasp
#

why is the interp percentage not based on local timing? that's surprising to me

thin stratus
#

What do you mean?

nova wasp
#

"Sending the SimProxy Interp From and To frames and the Interp Prcentage to the Server"

thin stratus
#

SimProxies in NPP don't get every FixedTick Frame replicated.

#

They have some To and From frame they interpolate between and a percentage that is based on their local tick.

nova wasp
#

if it's based on the local tick why is it sent

thin stratus
#

So if yo uwant to tell the server what the client is seeing, you gotta send it those values.

#

How else would you do it?

nova wasp
#

just use local state and interp from there... the distance could be considered locally trivially to me

thin stratus
#

What local state?

nova wasp
#

the end stage rendering result

#

vs the previous local state

thin stratus
#

Do you know how NPP works internally? Otherwise, this might be just missing info.

#

Or maybe I'm not clear enough. The 3 properties are sent from Client to Server for weapon hit validation.

nova wasp
#

I am probably missing something but I do not see why you would need to ever send the interpolation alpha between two states over the network unless you somehow cared about the client using that state exact right now as some timing value.. I don't really know how the npp works in terms of interp stuff

#

oh, you should probably include what you mean earlier lol

thin stratus
#

I did write that though

nova wasp
#

of course you would need the interp value for them hitting something in between interpolations

thin stratus
#

Maybe not clear enough, but yeah.

nova wasp
#

ah, I didn't connect you meant shooting at something in-between

thin stratus
#

Yeah sorry.

#

And that's what I want a similar thing for for Chaos Mover.

#

Eh

#

Chaos in general.

nova wasp
#

fixed async tick has been in Chaos for years

thin stratus
#

Cause we have Chaos Vehicles that can be shot at. And Hit Validating those, not sure.

#

Yeah, but that alone doesn't ensure that there is a Frame Number that is directly tied to the State that is in sync between both of them.

#

You can open CVD and look at Server and Client and change the Sync Mode to the Network Frame or whatever it is called.

#

It still doesn't really line up.

#

(CVD = Chaos Visual Debugger)

nova wasp
#

it won't ever truly line up... it's not a deterministic sim afaik

#

this is not Photon Quantum

#
When the client receives state information from the server, it compares them with the cached physics state in its history for the corresponding physics frame. If the state information differs enough, it triggers a physics resimulation.
thin stratus
#

Yeah, but the frame number it was able to get that they use for the CVD setting was as useful for checking an old transform of a vehicle as using the NPP frames that have nothing to do with Chaos.

#

As in, not useful at all.

nova wasp
#

the fact that NPP and chaos replication are two separate things is absolutely mindbendingly confusing

thin stratus
#

Ya

#

I think Chaos Vehicles are also not locally predicted, or?

#

If you put some latency in and push the throttle, there is a delay, right?

nova wasp
#

chaos vehicles support both according to docs

#

so they can be predicted if you want

#

and resimulated

#

since they are part of the async physics tick they are kinda just in there as is

thin stratus
#

Hm yeah, not sure how far that is. I think one of the previous UE versions only just started that

nova wasp
#

"how far" depends on alot

#

basically you cannot give a huge leash to a client here or else you will have an apocalyptic 10+ frame rollback

thin stratus
#

Maybe we should communicate "how far" via "Experimental" "Beta" "Side-Project".. old_man_yells_at_unreal

nova wasp
#

rollback netcode leans heavily on delaying input to render it later and reduce misses/ distance from valid frames etc

#

so I assume they have some caps on that

thin stratus
#

True, NPP keeps a Tick Offset and "how many frames to rollback" mostly depends on the ping.

nova wasp
#

I did try chaos modular vehicles out at one point and I found it kinda frustrating to make anything with

#

very hard-coded with stuff for no reason in a lof of places

thin stratus
#

All I want is a number I can send to the Server that more or less (doesn't have to be exactly the same) points to the same "state" on Server and Client.

nova wasp
#

you cannot support simulating the game 1000 times

#

at least not the typical unreal game

thin stratus
#

But yeah, right now I just use the NPP Frame Number and give Chaos Vehicle Hit Validation a bigger threshold. It's just a "not sure what else to do" solution.

nova wasp
#

does NPP frame tie into the chaos async fixed sim history or what

thin stratus
#

Not at all.

nova wasp
#

uh... I think you might be using the wrong number then lol

thin stratus
#

It's just a "not sure what else to do" solution.

#

I'm very much aware that I'm using the "wrong" number.

#

But the "right" number doesn't exist.

nova wasp
#

well

#

you can look into how their history buffers look and draw what each one looks like

thin stratus
#

The number that Epic shows in CVD as a Network Sync Frame is as useful as using the NPP frame :D

nova wasp
#

yeah I would assume the cvd frame is useful

#

it's possible that this thing does not work on global frames but is more local per object

thin stratus
#

Could be. Do they resimulate the whole physics scene or just some of it?

nova wasp
#

see FChaosSimModuleManagerAsyncCallback::OnPreSimulate_Internal I guess

thin stratus
#

Will try in the future. Currently nothing planned for improving this and I can't do that on my own due to client project. You can still head-shot a player that is in a vehicle at 150-200ms ping, so I could care less. Our Hit Validation is pretty much just "could the project reach the HitResult location" plus "is it HitResult roughly where the Character/Vehicle is".

#

The beauty of not having animations on the Server means you can freaking forget about proper Hit Validation -.-

nova wasp
#

yeah if you are already doing that well at 200ms that is awesome

#

I've basically been trying to get Jolt to work in a similar way for a while now... the cool part is Jolt actually can be fully lockstep but I'm getting fed up with the complexity of actually doing that

#

I would rather be close enough

thin stratus
#

Yeah, if the Server would tick anims, I could probably validate hits that are as old as the frame buffer allows for Mover (not for Chaos though).

#

Epic is pushing a bunch of performance analysis related commits for Chaos Mover. Hopefully it's not gonna be more expensive than the CMC lol.

nova wasp
#

well

thin stratus
#

Also not sure if Chaos Mover allows async physics or not.

nova wasp
#

the good news is the cost is somewhat linear

thin stratus
#

Or if that's even a problem I guess.

nova wasp
#

if you only do the expensive stuff in an async chaos callback at 60hz and swap it back

#

it's fairly isolated from the critical path

#

unless the main thread is waiting on a big sim

#

it might swap buffer for all I know though

thin stratus
#

True, might be less of a problem if one uses the async version of physics.

#

They couldn't have chosen a worse term with the async vs sync physics.

#

The second someone who doesn't know what that is about reads that they will be like "But, duuuuh, physics is already on a different thread and async."

#

But I guess I wouldn't find a better term -.-

nova wasp
#

since the resim is all async callbacks I am confused how this isn't async

#

turning on insights once could reveal if it's executing as a task or not

thin stratus
#

The Sync/Async part is about GameThread <-> PhysicsThread communication.

nova wasp
#

no reason it can't run on the main thread but

#

no need to guess

#

ah, you mean game thread code writing to it in the main tick

thin stratus
#

In Sync Mode, the GT will wait for the PT to provide the data back at the end of the Frame.

#

In Async Mode, the PT can perform multiple loops and even cross the EndFrame mark of the GT before it reports results back.

#

So "sync" here means "in sync with the GT tick".

#

Terribly confusing.

nova wasp
#

ah, that makes sense

#

In my case I kinda just start a new tick whenever enough time elapses

#

I used to have it on a task thread (with no forced wait) but I disliked how much input was delayed

#

so I suppose I'm not really doing it fully async in a sense

thin stratus
#

The docs link doesn't lead to anything anymore -.-

#

And the card description is wrong I think LOL

nova wasp
#

most docs and guides recommend enabling this for chaos replication modes (network physics component stuff)

thin stratus
#

When enabled, this new feature runs the physics simulation in its own separate Physics Thread as opposed to running on the Game Thread.

#

Yeah sure, we run the phys sim on the GT.

nova wasp
#

serves me right for assuming the comment would accurately describe it at all lol

thin stratus
#

I think Async Physics might actually improve the whole fixed tick stuff for Chaos.

#

Cause the PT can then keep on ticking at its fixed tick rate, no matter what the GT does.

nova wasp
#
Resimulations only happens on the clients, the server never correct itself since it has authority. If the server were to have a different result after having processed the same inputs as on the client then the client needs to perform a resimulation to correct itself based on the servers outcome.
#

huh... that is surprising

thin stratus
#

Right, so it can't do some of the stuff the CMC does.

#

Like accepting the Client's state.

nova wasp
#

I guess that's not a bad idea due to how slow user input could be and given you have 60+ people connected

#

it would be doing a LOT of work

thin stratus
#

Yeah

#

Also potentially cause other Clients to resimulate. Sounds like a domino effect of resimulations.

#

Someone on Reddit who hasn't lost their marbels yet.

#

Are they correct, however? I don't think so :D

#

I think the whole Async Physics Tick is even more confusing to the general audience than it is to us.

nova wasp
glossy wigeon
tardy fossil
#

my custom network movement system uses fixed async tick but i had to do some some kinda janky stuff for moving kinematic stuff..

#

also physics rollback does make it roll back too which was kinda annoying lol

rustic ore
#

How would I implement a multiplayer listen-server match setting like this? Currently, these values are stored inside my GameMode class; some of them, like WarmUpDuration, are replicated to the clients through GameState. Where do I store these match setting values?

thin stratus
rustic ore
# thin stratus Is this already with connected clients?

No, I don't plan on having a server lobby. Game starts on gameplay level by default and clients join the session goes to gameplay level aswell. I was thinking on keeping the settings in GameUserSetting for the server hoster

thin stratus
#

Depending on how many settings, you can also pass them along the OpenLevel command.

#

?Setting1=Value1?Setting2=Value2 etc.

#

And then grab the Options String on the other map's GameMode and parse it again.

rustic ore
kindred widget
tardy fossil
#

another option might be to use a save game object which the game mode class could load and apply

#

with the added benefit of stuff being saved

lament flax
#

how much does it cost in bandwith to have the server send a new transform to the client ?

#

does it do 1 RPC per component ? or can it compact them if multiple scene components move in a same frame

tulip kiln
#

anyone have idea how i setup a volume specific to a player ?
it s basic thing but cant find tutorial and AI just tell shit random

#

for now anyone enter the volume is cast to everyone

fossil spoke
#

If its a Pawn, you can use stuff like IsPlayerControlled

tulip kiln
#

AI respons to this problem : ๐Ÿคฃ

tulip kiln
quasi tide
#

That still won't work by the way

#

Because all of the player pawns are going to be player controlled

fossil spoke
#

Your absolutely right, I completely misread what he was asking for

tulip kiln
#

there is a volum in the volume and i want it affect only players inside . for now affect everyone

quasi tide
#

How are you identifying which player a volume reacts to?

tulip kiln
#

*volume in the lvl

fossil spoke
#

Ok maybe my answer is correct

#

But he didnt articulate what he needed properly.

quasi tide
#

Oh, so you want it to affect all players inside and only players?

tulip kiln
fossil spoke
#

Language barrier issue here I think.

quasi tide
#

Then do what Matt said.

fossil spoke
#

@tulip kiln Drag from your Cast, search IsPlayerControlled

#

Plug it into a Branch node

quasi tide
tulip kiln
#

like this ?

fossil spoke
#

Yes

quasi tide
#

If that is true, that means that pawn is a player.

tulip kiln
#

so like this ? look nice

fossil spoke
#

Yes, that will only allow Players to execute that code

quasi tide
#

You could also cast to a pawn instead by the way

#

To avoid hard referencing issues with casting to a BP.

tulip kiln
fossil spoke
#

Got nothing to do with MP

tulip kiln
#

but i think that ok really few thing in the level can be all hard reference

quasi tide
#

Do whatever you want. I'm just letting you know.

tulip kiln
#

like 2 volume 3 buton

fossil spoke
#

Its just better practice

tulip kiln
#

yes true

#

thanks for your help . better respons that all ai that just told random shit

tulip kiln
#

hmmm some how doesnt work anymore

#

before was casting to everyone but now feel it cast to no one

#

at least dont play the print screen at the end

fossil spoke
#

You are extremely new to Unreal, I would suggest that you dont start with a Multiplayer project.

#

You will have better success with a Singleplayer only experience.

tulip kiln
#

i dont work alone on my project i m just the guy making the map

#

but if i can solve stuff before asking other guy that good i want to learn

dark edge
# tulip kiln

Which player do you want to know about a collision with?

tulip kiln
#

local player

#

this dont work

#

its to activate/desactive visual effect

quasi tide
#

Local player?

#

Then you need Is Local controlled or something like that (I forget the exact function name)

tulip kiln
#

ok i try that

#

ok this make error

#

2025.12.08-11.08.36:585][310]PIE: Error: Blueprint Runtime Error: "Accessed None trying to read (real) property LastHitBy in Pawn". Node: Branch Graph: EventGraph Function: Execute Ubergraph BP Remove Fog BP Blueprint: BP_RemoveFog_BP

quasi tide
#

Because you need to get the controller from the pawn

tulip kiln
#

ok i try that

quasi tide
#

No

tulip kiln
#

no error but no rint string

tulip kiln
quasi tide
#

You get the controller from the pawn

#

Then check if that is a local player

#

That's how you check if it is local

tulip kiln
#

like that ?

quasi tide
#

No

tulip kiln
#

yea fil strange

#

feel

quasi tide
#

No

#

You got the controller

#

So now you check if it is locally controlled

#

You are getting the instigator

tulip kiln
quasi tide
#

Yes

#

That's how you check if it is a local controller

tulip kiln
#

guive me error

#

i try another

#

mmhh same

quasi tide
#

Why did you change the thing that I said?

#

Show the error that you get

tulip kiln
#

error the small image

quasi tide
#

I don't care about that error

#

Go back to the method I told you to use

tulip kiln
#

this ?

quasi tide
#

Yes

tulip kiln
#

it show the error

quasi tide
#

Then paste the error that you get

tulip kiln
quasi tide
#

That is probably because it is hitting it on an AI - which, if I recall, doesn't exist on clients

#

So you need to add the check in there to see if it is a player controller

tulip kiln
#

mmm... i will investigate (by looking how my guy solve MultiPlayer problem so far xD ) . thanks for time spent

dark edge
tulip kiln
#

like one in the bottom ?

#

from text i understand error comme fron the get controller

#

yea errror came from get controller

#

if i remove no error

dark edge
# tulip kiln

Read that chain of calls.

You don't care if the heroshooter's controller's instigator is locally controlled, you care if the heroshooter is locally controlled.

tulip kiln
#

yea i tried that nothing happen

dark edge
#

Thing happened -> was it a B_Hero_ShooterMannequin? -> yes -> was it locally controlled? -> yes -> ok do the thing

dark edge
#

is the cast succeeding?

tulip kiln
#

seem s not true

#

wait i bran on false

#

yea go to false

dark edge
# tulip kiln

Does the print string ever fire in any situation ever?

tulip kiln
#

yes if i remove is localy controlled

dark edge
#

Are you only enableing overlaps on server or something?

#

What are you actually trying to do here, and what's your setup besides what's been posted.

tulip kiln
#

Is simplify maximum for test there is nothing more that what on the screen . Just volume overlap. Maybe there is a bad setting somewhere. I will check that

#

If I just put the cast all work but if only 1 player. If I put more nothing work

dark edge
# tulip kiln

assuming B_Hero_ShooterMannequin can trigger overlaps with the BoxTop everywhere, this cast and branch should succeed on the machine the pawn is being controlled from, and only on that machine (server or client). If that's not the case then it's something else.

tulip kiln
#

Will recheck all when front of computer. Thanks for all the suggestions

tulip kiln
#

after putin tick interval to 0.1 instead 0 seems it start to work...

#

is i put 2 player one returne the true node

#

but if only 1 player not working

tulip kiln
#

alos only host is working

#

well has they are not local seem s correct probably

#

well that opposite sorry only work for client not the server side

#

i tried that but output is not message from server side

#

if i play as client it work

dark parcel
#

I scrolled down but still don't understand what you are after.

#

as client, you are going to get null on other people controller but it's own.

lethal warren
#

Hi guys !
I can't find the solution on how to possess existing pawn for clients in multiplayer

I am using blueprint and i spawn multiples pawns (not all the same)
but i can't figure out how to possess them
as GM is only on the server, i read that i can't use PC but then i don't understand how to do it

can someone help me please ?

lost inlet
#

Possess (on Controller) is BlueprintCallable

#

so I'd use that

#

but you MUST call it from the server

dark parcel
lost inlet
#

if it's a client action, then yeah, you'd need to send a server RPC. but you'd probably be using your game specific player controller class for that anyway

#

so the only context you'd pass is the pawn you want to possess, since server RPCs must be called through an actor the client owns

dark parcel
#

I don't know where you read that you can't use PC.

#

Server has everyone's PC.

#

if you want to initiate the possession event from client machine, then send server RPC so it runs on server's copy of the actor.

lethal warren
#

Thanks guys !
I will do that !

lost inlet
#

I would've thought that was misinterpreting something

#

like a client only knows about its own player controller

dark parcel
#

typically a client would request the server to possess something.

#

would be weird imo if player 2, request the server for player 3 to possess something.

#

if that were the goal, then that's server side exclusive business to begin with.

lethal warren
#

Another question: how do you make sure each player doesnโ€™t choose the same pawn to possess ?

dark parcel
#

Client Reqest to possess hero A for example.

Server check if Hero A is already possesed by another player.

If it is then reject and inform the client that the possession is denied.
If not possesed yet, then proceed.

tulip kiln
keen slate
#

Is it possible to move an AI Actor with Mover?
The "Mover Examples" plugin implements its AI movement by having the AI be a Pawn, and then moves it using "AI MoveTo". But I'm trying to use Mover without the AI having a Controller. (the Mover documentation literally promises that Mover can be used on Actors)

Btw. also using "MoverNetworkPredictionLiaisonComponent" (I think this is the non-Chaos ?), as that is what the "Mover Examples" is also using.
(UE 5.5.4, Mover 1.0)

#

I also constantly get this warning message, which I don't understand: LogMover: Warning: Attempted to queue an unregistered movement mode: NavWalking

The movement mode should be added already (= registered??) like in this screenshot.
If I set "Starting Movement Mode" to Falling, it doesn't complain except for runtime (second screenshot)
If I set "Starting Movement Mode" to NavWalking I get this warning: LogMover: Warning: Invalid StartingMovementMode 'NavWalking' specified on BP_TestMoverCrawler_C_2. Mover actor will not function.
If I set "Starting Movement Mode" to Walking, the editor crashes!

keen slate
#

Is this an issue with simply updating the engine to 5.7 and then trying again?

latent heart
#

Probably. Mover is very experimental.

thin stratus
thin stratus
thin stratus
keen slate
#

Alright! I will try to run it on 5.7, and probably describe the result in here for anyone curious. Thanks!

dreamy marten
#

Hello everybody!
Sorry if I'm bringing a dumb question here.
But in 5.7 I cannot make server travel work for some reason. And the setup is super simple.
I believe I used to do it this way, but for some reason it just doesn't work on 5.7.
I read about the Steam Sockets thing, that I needed the plugin and the config file configuration, and I did both. But even so, it doesn't work.
Any kind soul could guide me in the right way here? ๐Ÿ˜…
Thank you very much, everyone

unkempt lodge
#

Hey guys, I'm not sure if my problem is more linked to multiplayer or to animations. I have a really weird behavior when i play a montage with an anim notify on multicast. The notify is triggered two times on the server while the animation is only played once. I changed the montage tick type of the anim notify from queue to Batching point and after doing this it was not triggering the anim notify twice. I don't really understand what is happening. And this is only happening on the client side.

#

I don't really understand why it is only happening when i play on client

#

Is it maybe due to some rollback ?

harsh widget
#

no its because the montage is played twice (Server and Client)

#

its a known thing. I know a video which explains how and why gimme one sec

harsh widget
# unkempt lodge Hey guys, I'm not sure if my problem is more linked to multiplayer or to animati...

In this video, we fix a couple of bugs that are caused by notify windows when used in animations that run in a networked environment.

tl;dr we will be using anim notifies instead of anim notify States/Windows because they don't work as expected in multiplayer.

โœจ Support the channel & get exclusive perks on Patreon:
https://www.patreon.com/Al...

โ–ถ Play video
#

here he explains how and why

unkempt lodge
harsh widget
#

that shouldnt matter

unkempt lodge
#

In his case, the problem is only appearing when he has anim notifies windows

#

But yeah I think it's the same problem but I can't apply his fix to my case as I am already using instant anim notifies

harsh widget
#

hmmm

#

if the problem is alr known maybe there are different fixes for different anim notifies

unkempt lodge
#

I guess I will just keep this fix for now

#

But it looks more like a workaround than an actual fix

harsh widget
#

maybe someone else in the dc has a good solution for that

silent valley
unkempt lodge
silent valley
runic crane
#

Hi there! My game is crashing when doing a server travel in multiplayer and while I've tracked down the cause, I'm not sure why it's happening and how I can maintain the functionality I need otherwise.

Basically, I just want actors with ASCs to check for tags on the local player to determine whether they should be visible or not. So on Begin Play for the ASC, I look for a local player, get their ASC, and sub to the relevant tag/event. However, in multiplayer and when server travelling, that local player doesn't always seem to be ready at this point. So I have these actors also sub to a game state delegate for when a new local player is recognized.

The player character tells the game state to fire this delegate on its OnRep_PlayerState, and that specifically is what sometimes crashes the game after a server travel. It'd be nice to understand why that would cause a crash in the first place, but an alternate solution would also be appreciated.

vital fiber
#

Hello! I am replicating this physics simulating helicopter in my game, for the server all the movement is smooth and looks great. Hovever on the client side its choppy and laggy and unplayable, what could cause this?

Its only the server thats doing the calculations for the helicopter movement and applying the force every tick, i also turned of simulate physics for the client becuase i assume its not needed. Does anyone have an idea what could cause this jitter?

#

The video shows the issue

#

The images shows a bit of my setup

dark edge
#

Unless you roll your own system to interpolate and smooth the movement on the client

vital fiber
dark edge
vital fiber
dark edge
dark edge
vital fiber
dark edge
#

read that

vital fiber
#

i will read that looks like what i need ,thank you

vital fiber
#

in some tutorials i saw the replicated physics looked great straight out the box, thats why i dont understans my issue, my guess it has to with me adding force every tick or soomething

dark edge
#

adding force every tick is correct for a heli

#

that's how forces work.

vital fiber
#

yup

#

i tested now and just letting the helicopter fall in the beginning is smooth, and synced

#

so it seems like there is some issue when i apply forces

#

idk how i should replicate it correctly

#

this is ran on the server

#

do you know if this is a good way or could this cause any issues?

dark edge
#

that way the client can do some simming BETWEEN updates, and the physics interpolation has less work to do.

devout dagger
#

I am using the same base character for all of the players in my game. but now when i equip something with one character it equips it for the other characters. how do i seperate the characters so equiping something doesnt equip it for all of the players?

quasi tide
#

You need to do it dynamically.

#

So on spawn, give them something.

#

Or have them select something from a screen

#

W/e

#

Really can't say much without more specifics on how your game is

#

But the crux is - it needs to be dynamic

fossil spoke
#

Its always helpful to provide some code relevant to the question you are asking.

#

How are you performing the equipping?

devout dagger
fossil spoke
#

Im not familiar with Mutable unfortunately, but I would hazard a guess towards you misunderstanding something about that system and how it works.

#

Or at least, how to use it properly.

quasi tide
#

Poor Matt - won't get to use Mutable for probably another decade

fossil spoke
#

Don't remind me ๐Ÿ™

#

Is it good?

#

Please tell me it sucks

#

And Im not missing out on much

#

๐Ÿ˜›

quasi tide
#

It is supposed to make customization (think like character skins or weapon skins, etc..) a lot easier.

#

Anywho - I don't have much experience with it personally because our game doesn't need it.

devout dagger
#

it made it very simple for me, but now im hung up on the multiplayer portion of it

quasi tide
#

But it sounds like you're changing the asset that both classes are pointing to.

#

So then both classes get word of that change and then do their onrep

devout dagger
#

I think you are right. Is it best to make children of the class?

quasi tide
#

Show the code that you're using to do said change.

devout dagger
#

this is the toggle

quasi tide
#

Would have to dig into it to see if the "instance" is actually an instance.

#

Epic likes to pull pranks on people from time to time.

devout dagger
#

im still learning about instancing and im trying to figure out how each player can have their own instance. because i believe i have them linked together right now

quasi tide
#

Based on what you're saying is happening though - pretty sure the issue is what I said. You're changing the asset that both reference.

#

Not too familiar with Mutable, so can't help much more than that.

#

Maybe there is some step that is missing to make it unique per instance or something

devout dagger
#

Ill keep researching it. I know im not the first to work on this. wont be the last either haha

dark edge
# devout dagger

Do debug keys fire everywhere, not just on actors with input enabled on them?

#

Could be that you're literally telling 2 actors to both swap their pants

quasi tide
#

That too. But I assumed this was on the player. And input should be routed through the player controller there first.

dark edge
devout dagger
#

i just made a child of that same character and took to debug key off of the other character and it is still doing it.

dark edge
#

child or copy?

devout dagger
#

i made a child. maybe should do a copy? where should i pu the locallycontrolled?

#

I made a duplicate of that character and the pants still change. so they are still communicating somewhere that im unaware of. probably somewhere in mutable that i am unaware