#multiplayer

1 messages · Page 271 of 1

hybrid zodiac
#

Thanks both! I'll investigate Chaos mover and see how much work is required to migrate over

exotic wasp
#

my experience with chaos mover half a year ago is that it crashed when I would open the bp

#

probably advanced since then if fortnite is using it?

#

if it's good enough for hundreds of players in a map for fortnite, I have no qualms with physics based movement

thin stratus
#

They did commit a bunch of stuff the past 6 months for Chaos Mover.

#

But the point remains that Mover in itself is not even close to the feature level and robustness of the CMC.

#

Sadly stuff like this only ever comes to light when a project is already on the way for a few months or something more complex is needed.

exotic wasp
#

I just wish it was easier to mesh with GAS prediction

meager spade
#

no we still use CMC atm, but im working on switching as we only have very basic movement

#

and in my tests mover is faster than CMC for what we need

meager spade
#

ofc it requires a lot of different thinking, cause inputs are not how you do it via CMC

#

you have to send the state snapshots in

#

like WantsToCrouch and not already crouching

meager spade
#

iirc it was used in Lego side

#

im pretty sure battle royale still uses CMC..

quasi tide
#

Yeah, BR is still using CMC most likely.

#

But FN Creative is moving to Mover

#

I seen't it at UE fest

meager spade
#

yeah creative is like the playground

#

you dont want to break the main Battle Royale

#

thats the money maker

#

kinda sad that they gave up with Save the world though

#

as that was what Fortnite was

quasi tide
#

Yup

meager spade
#

but BR exploded (thanks to Pubg at the time) and ofc Fortnite with its less serious play style to PubG exploded.

quasi tide
#

RIP STW and Paragon and UT

meager spade
#

Paragon was a shame

#

UT was doomed as soon as fortnite exploded

#

cause they pulled the team into Fortnite

#

for BR right?

quasi tide
#

Yup

meager spade
#

yeah and most of them left now

#

i always wanted to take UT4 and carry it on, but getting permission from Epic

#

cause its all there stuff, you cant jus tmake a game using UT5

#

UT4*

thin stratus
#

Mover, at least when I started using it, literally crashed if you destroy the actor while it is being moved by based movement.

#

You can do the basics, but it's just not "battle tested" and is lacking the stuff that the CMC received based on noticing problems.

obsidian ermine
#

I 100% agree with this ^^^^
Mover is nowhere near production use ready.

hybrid zodiac
#

We are making an FPS-Z title inspired by Tribes, so we have walking, jumping, jetting, skiing and we also added the ability to ski on walls and wall-jump. So far it's all working great with Mover, and I do like how modular it is.

The main issue that inspired me to ask the original question was that I noticed that simulated proxies could sometimes look quite juddery at high speeds (you can hit 200mph if you're good with movement), and my hypothesis which was later confirmed by you guys is that NPP isnt properly simulating movement when forward predicting, so it's constantly having to get updates from the server which becomes noticeable when movement per tick is so high

#

So my experience with Mover is pretty positive overall, its just frustrating that it isn't well documented or, as in the case with NPP, finished

#

Hopefully the Chaos mover can fill that missing piece

verbal ice
#

Tbh moving at such high speeds is kinda niche, you might end up having to handle your own smoothing/simulation of those pawns even on another framework

grand kestrel
# hybrid zodiac Hopefully the Chaos mover can fill that missing piece

Yeah mover 2.0 is just their prototype. Any engine movement component also is going to be less suitable the more you move away from generic movement. I built a movement component from scratch for my platformer because getting Mario movement physics from CMC or another option wasn't going to happen

#

It's so much work tho, makes you appreciate CMC all the more

blazing bear
#

IIRC First Person Rendering fixes that, it's production ready in UE 5.7. It's just really good as it provides you with many other features you'll need in your case like accurate self shadows in first person, there is an Unreal Fest video talking about it somewhere.

compact flame
#

How do I fix the jittering of chaos vehicles on client side?

blazing bear
pliant cypress
#

Oh okay

pliant cypress
#

overloaded GetMesh()

#
USkeletalMeshComponent* ASoldierCharacter::GetMesh(int32 Index) const
{
    if (Index == 0) Super::GetMesh();
    else if (Index == 1) return FPS_Mesh;
}
nova wasp
#

GetMesh() has no parameters and is not virtual

#

you should probably just make a separate function for getting the other mesh

#

If you do need something that gets it based on the local perspective it should consider being the local view target (which is cached on pawns)

pliant cypress
#

just fixed it yeah

nova wasp
#

APawn::IsLocallyViewed for example

#

this is how OwnerNoSee and OwnerOnlySee work, they use the view target to figure out if they are a component attached to the view target or not

#

This is nice because changing view targets will change what you see

pliant cypress
#

i was following this tutorial

pliant cypress
nova wasp
#

I was just saying for if you needed to figure out which mesh was the "active" one dynamically

pliant cypress
#

how can i fix this?

#
void UCombatComponent::EquipWeapon(AWeapon* WeaponToEquip)
{
    UE_LOG(LogTemp, Warning, TEXT("SoldierCharacter: %p"), SoldierCharacter);
    UE_LOG(LogTemp, Warning, TEXT("WeaponToEquip: %p"), WeaponToEquip);
    if (SoldierCharacter == nullptr || WeaponToEquip == nullptr)
    {
        return;
    }
    
    EquippedWeapon = WeaponToEquip;
    EquippedWeapon->SetWeaponState(EWeaponState::EWS_Equipped);
    const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
    if (HandSocket)
    {
        HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetMesh());
    }
    EquippedWeapon->SetOwner(SoldierCharacter);
}

void UCombatComponent::OnRep_EquippedWeapon()
{
    EquippedWeapon->SetWeaponState(EWeaponState::EWS_Equipped);
    const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
    if (HandSocket)
    {
        HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetMesh());
    }
}
#
void ASoldierCharacter::ServerEquipButtonPressed_Implementation()
{
    if (Combat)
    {
        Combat->EquipWeapon(OverlappingWeapon);
    }
}
pliant cypress
nova wasp
#

It depends on the perspective

pliant cypress
#

i got it on FPS mesh

#

but now got stuck with full body mesh

#

updated code

nova wasp
#

I do not know what that means

pliant cypress
#
void UCombatComponent::EquipWeapon(AWeapon* WeaponToEquip)
{
    UE_LOG(LogTemp, Warning, TEXT("SoldierCharacter: %p"), SoldierCharacter);
    UE_LOG(LogTemp, Warning, TEXT("WeaponToEquip: %p"), WeaponToEquip);
    if (SoldierCharacter == nullptr || WeaponToEquip == nullptr)
    {
        return;
    }
    
    EquippedWeapon = WeaponToEquip;
    EquippedWeapon->SetWeaponState(EWeaponState::EWS_Equipped);
    if (SoldierCharacter->IsLocallyControlled())
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetFPSMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetFPSMesh());
        }
    }
    else
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetFPSMesh());
        }
    }
    EquippedWeapon->SetOwner(SoldierCharacter);
}

void UCombatComponent::OnRep_EquippedWeapon()
{
    EquippedWeapon->SetWeaponState(EWeaponState::EWS_Equipped);
    const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
    if (SoldierCharacter->IsLocallyControlled())
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetFPSMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetFPSMesh());
        }
    }
    else
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetFPSMesh());
        }
    }
}
pliant cypress
nova wasp
#

IsLocallyControlled should be IsLocallyViewed unless you plan to never have spectating/replays in first person

pliant cypress
nova wasp
#

you also appear to be using GetMesh in both cases for local and non locally controlled

pliant cypress
pliant cypress
# pliant cypress
void UCombatComponent::EquipWeapon(AWeapon* WeaponToEquip)
{
    UE_LOG(LogTemp, Warning, TEXT("SoldierCharacter: %p"), SoldierCharacter);
    UE_LOG(LogTemp, Warning, TEXT("WeaponToEquip: %p"), WeaponToEquip);
    if (SoldierCharacter == nullptr || WeaponToEquip == nullptr)
    {
        return;
    }
    
    EquippedWeapon = WeaponToEquip;
    EquippedWeapon->SetWeaponState(EWeaponState::EWS_Equipped);
    if (SoldierCharacter->IsLocallyControlled())
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetFPSMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetFPSMesh());
        }
    }
    else
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetMesh());
        }
    }
    EquippedWeapon->SetOwner(SoldierCharacter);
}

void UCombatComponent::OnRep_EquippedWeapon()
{
    EquippedWeapon->SetWeaponState(EWeaponState::EWS_Equipped);
    if (SoldierCharacter->IsLocallyControlled())
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetFPSMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetFPSMesh());
        }
    }
    else
    {
        const USkeletalMeshSocket* HandSocket = SoldierCharacter->GetMesh()->GetSocketByName(FName("RightHandSocket"));
        if (HandSocket)
        {
            HandSocket->AttachActor(EquippedWeapon, SoldierCharacter->GetMesh());
        }
    }
}
nova wasp
#

I have no idea what I'm looking at here either, you have not described which images show which perspectives

#

if you change just two lines it might be better to just edit the message instead of pasting the giant code block again

pliant cypress
#

i want the gun for Simulated Proxies to be attached with fully body

#

but for the client/server who have equipped the weapon to have gun attached to FPS Mesh

nova wasp
#

debug it I guess

#

this will silently fail if it can't find the socket because it does not ensure or log an error

nova wasp
#

prove the AttachActor is being called in all cases

#

add {,,UnrealEditor-Engine.dll}::GPlayInEditorContextString to your debug watches or just get GetDebugStringForWorld(World)

pliant cypress
#

can u pls explain how can i do this?

nova wasp
#

it is REALLY important that you understand how to debug stuff in your IDE here

#

what this is is a global variable you can watch in the watch window

#

that shows the name of the current world

#

this is useful so you can figure out if you breakpoint on player 0, 1, 2, the listen server, etc

#

you can also just spam debug logs if this is difficult to set up. You can get this string by calling GetDebugStringForWorld

nova wasp
#

just to be clear you are aware of what a breakpoint is, right?

pliant cypress
#

just don't know what {,,UnrealEditor-Engine.dll}::GPlayInEditorContextString this is

nova wasp
#

yeah this thing is an unfortunate wacky prefix you need to use to tell your debugger about which module that type is in

#

it's weird... in an idea world we could just use "GPlayInEditorContextString "

#

some IDES might be smarter about resolving this than others

#

in my case (I forget why) my custom engine has renamed the base module which is annoying

#

yours should just be UnrealEditor-Engine though

pliant cypress
#

i am using Visual Studio

#

2022

nova wasp
#

just add it to the watch

#

most of the time you will only care about local variables/this but it can be useful to see other things consistently

pliant cypress
#

but what should i look into for this?

#

in single player

#

debugging is kinda easier even with breakpoints

#

this is for OnRep_EquipWeapon

#

@nova wasp I'm using IsLocallyControlled. If I also use NetRole == Simulated proxies, and attach it to full body mesh for simulated proxies.

Make sense or illogical?

nova wasp
#

I already said to use IsLocallyViewed

#

I suppose you may also need to swap between the two as well if view targets change

#

also debugging will be difficult if you are not using DebugGame Editor

pliant cypress
pliant cypress
nova wasp
pliant cypress
#

Cod MW2 (2009) to be specific

#

Each loadout prefixed per mission (level)
Basic multiplayer coop (Spec Ops)

#

Quest system (Missions / story progression)

nova wasp
#

I think I am asking about the code I am seeing, I don't really need to know everything else about the game

#

it helps I guess to get an idea of what you want but I am asking on which sides each function runs on

#

does EquipWeapon run only for the local player? from something else?

pliant cypress
nova wasp
#

if it's COND_OwnerOnly how are the simulated proxies going to see it

#

you are describing the complete opposite

pliant cypress
nova wasp
#

is this onrep firing on simulated proxies or not?

pliant cypress
pliant cypress
nova wasp
#

I am referring to the function being called

pliant cypress
#

Sorry for the bad english

nova wasp
#

all good, if I say anything confusing I can try to make it easier to understand

pliant cypress
#

The issue is, OnRep is actually attaching the gun to fps mesh which it shouldn't be

#

Basically, if you Equip a weapon. I'll see gun on your full body mesh not the fps mesh. While you see, then you'll see the gun on your fps mesh

thin stratus
#

That's a lot of text, quick question: Is this about attaching a WeaponActor to FirstPerson and ThirdPerson meshes?

nova wasp
#

I am super lost because you are saying the replicating condition is owner only, but is firing on sim proxies

#

if there are TWO distinct properties we need to know that, we can only see what you show us

thin stratus
#

There is one key thing about this, which I'm not sure was mentioned, so I'm throwing it in:

Attachment in itself is replicated, which means whatever the Server attaches to will be replicated and attaches to on Clients by default.

nova wasp
#

ah, I should have asked if the weapon has replicated movement too

thin stratus
#

Of course with the little note that the Actor you are attaching has to be replicated.

nova wasp
#

that's a good point

pliant cypress
#

Wait, I'll public my GitHub repo

thin stratus
#

ReplicatedMovement isn't requited for this.

#

It happens by default for every Actor that is replicated.

pliant cypress
thin stratus
#
/**
 * Used for replicating attachment of this actor's RootComponent to another actor.
 * This is filled in via GatherCurrentMovement() when the RootComponent has an AttachParent.
 */
UPROPERTY(Transient, ReplicatedUsing=OnRep_AttachmentReplication)
struct FRepAttachment AttachmentReplication;
nova wasp
#

Just click on the weapon actor and see if it's replicated

pliant cypress
#
UPROPERTY(ReplicatedUsing = OnRep_EquippedWeapon)
AWeapon* EquippedWeapon;
nova wasp
#

THE ACTOR ITSELF... not a pointer to it

#

also yeah I guess if this is replicating it and resolving it would have to be replicated

pliant cypress
#
void ASoldierCharacter::ServerEquipButtonPressed_Implementation()
{
    if (Combat)
    {
        Combat->EquipWeapon(OverlappingWeapon);
    }
}

void ASoldierCharacter::EquipWeapon()
{
    if (Combat)
    {
        if (HasAuthority())
        {
            Combat->EquipWeapon(OverlappingWeapon);
        }
        else
        {
            ServerEquipButtonPressed();
        }
    }
}
thin stratus
#
void AActor::GatherCurrentMovement()
{
    if (IsReplicatingMovement() || (RootComponent && RootComponent->GetAttachParent()))
pliant cypress
#

these are the code

nova wasp
#

we are asking about the weapon

#

not just something that points to it

pliant cypress
#

weapon is replicated

thin stratus
#

@pliant cypress The point is that your WeaponActor, if replicated, will automatically replicate Attachment Information and handle attachment in OnRep_AttachmentReplication.

pliant cypress
thin stratus
#

If you additionally handle attachment in your own code, e.g. via some OnRep, you are fighting that.

#

You will need to override the OnRep_AttachmentReplication in your Weapon.

nova wasp
#

okay, then you are fighting attachment replication
you can simply override ::OnRep_AttachmentReplicationto not do anything as a simple band-aid fix

#

there is a special macro to disable replicating a property manually but I would rather not look it up right now

thin stratus
#

Correct. Other games simply don't use Actors for the Weapons, but have a WeaponMesh they attach, which doesn't have that issue.

#

But overriding the OnRep_AttachmentReplication is a valid solution imo

nova wasp
thin stratus
#

Yeah sorry, I meant for the WeaponMeshes and the Attachment part.

pliant cypress
thin stratus
#

For starts you'd just leave it fully empty.

nova wasp
#

just leave it empty

#

you can just not call the super

#

why would it need to do anything here?

#

it might be valuable to ignore it only if it's for a certain actor maybe? I don't know

#

for example if you know it's for a character, ignore it but use it if it's replicating attaching to a vehicle

thin stratus
#

Your problem is that Unreal Engine takes the Attachment Information, replicates it, and applies it. Means that if your Server attaches the Weapon to the ThirdPerson Mesh, it will do that for Clients too.

But you want to do this manually in your own OnRep_EquippedWeapon, at which point you have to disable the default behavior.
And you do that by overriding OnRep_AttachmentReplication in your WeaponActor and just leaving it fully empty (also no Super call).

pliant cypress
nova wasp
#

no... that is not the issue

#

listen server or not, it will still replicate

thin stratus
#

Just override that function we mentioned and leave it empty.

pliant cypress
nova wasp
#

did you actually override it for the weapon?

pliant cypress
#

i did

nova wasp
#

I am a bit worried there might be one or two more places that can use attachment replication

#

but this should help

pliant cypress
#

@thin stratus @nova wasp Man, thank you for the great help

#

it did work

thin stratus
#

No worries. You can be happy that you are using C++, cause Blueprint peeps are lost on this :D

nova wasp
#

eXi figured it out, I was not even thinking about the weapon 😛

pliant cypress
thin stratus
#

I didn't even know what the problem was, I just threw in that the Actor does this crap by default :D

pliant cypress
#

one question

#

how to debug multiplayer?

#

single player is good, set breakthough and check

thin stratus
#

Gotta be more specific.

pliant cypress
#

what about client and server side debugging

nova wasp
#

I already told you to add the PIE debug name to watches

pliant cypress
#

just changed configuration to Debug editor

nova wasp
#

this is a big subject and there are a lot of different things unreal can do to help here... for starters you can just literally click on things in the editor

pliant cypress
#

debugGame edtor?

nova wasp
#

yes, you need to be in debug/debuggame to debug c++

#

otherwise all code will be optimized away

#

you should read the pins in #cpp to get started

thin stratus
#

When playing in the Editor and you are using a Single Process, which one almost always does, then you can't specifically choose if you want to breakpoint Server or Client. If a function is called on both, then you just have to check if the breakpoint hit on the the one you want to debug and if not, continue until it does.
The Watch that Megafunk mentioned can help with that, as it tells you, in most cases, which one caused the breakpoint.

#

Not sure how non-Single Process behaves here in Editor.

#

If you have a packaged build, then that problem somewhat resolves itself, as you'd attach your IDE to either the Client or the Server process anyway.
If you attach it to both at once, then you are back at the Breakpoint being able to call for either.

#

If you breakpoint functions that you 100% know are only calling on Server OR on Client, then the Breakpoint will also only hit on that one, so that part is straightforward.

#

For multiple Clients, you'd still want the Watch to know which Client caused it.

nova wasp
#

you can use conditional breakpoints if possible or even just add an if statement that switches on local network mode to make a breakpoint only hit for clients

#

sometimes temporary debug stuff like that is helpful

#

conditional breakpoints are unreliable

thin stratus
#

True, that can help. I'm not having much luck with Conditional Breakpoints, in general, though.

nova wasp
#

also a lot of debug printing in PIE can actually be sent FROM the dedicated server to display in other worlds but I forget the details

#

I would recommend just using the visual logger honestly... it can split categories for each instance in the options

thin stratus
#

If you want to print some value that you know can print on both sides or generally multiple players, etc., you'd want to also print the NetRole if you can (not always available).

nova wasp
#

no need to make a new thing

thin stratus
#

Ah, yeah that could also work. I'm just used to printing NetRole.

nova wasp
#

and yeah this stuff can just be hard... it can really help to make dedicated in-game debugging tools

#

that for example just debug draw where things are

#

so you can turn a cvar on or something and see more information for a certain thing

#

I make HEAVY use of visual logging when dealing with network movement code

#

it helps that way to be able to scrub through things

pliant cypress
#

🙂 great advices. Thanks for this too

thin stratus
#

Yeah I'm quite blessed with NPP/Mover having a dedicated Insights view that lines up the data to frames. I hate debugging network movement code when needing to check values due to ping..

nova wasp
#

yeah I should honestly try to jury rig my stuff into that

#

might be annoying though

pliant cypress
#

i'm making sprint now

#

in CMC as you suggested

nova wasp
#

yeah, stick with the cmc

#

you do not want to be fixing issues with mover...

thin stratus
#

Yeah, that Insights View is also not a reason to use Mover haha, stay with CMC:

pliant cypress
#

Sprint only in forward and forward diagonal. Not backward or right/left

icy trench
#

do you have to package your game everytime you want to test a new feature?

thin stratus
icy trench
#

so the dedicated server doesn't need to be packaged again before I test in the editor?

thin stratus
#

No, you shouldn't mix packaged builds and the Editor anyway.
You can play in the Editor with a dedicatd server by just selecting "Play As Client" in the settings.

#

If you test packaged builds, you should build Server AND Client and test them together.

icy trench
#

alright ty

pliant cypress
#
virtual FSavedMovePtr AllocateNewMove() override;

Is this removed from FNetworkPredictionData_Client?

#

i'm getting red lines on ths

#
class FNetworkPredictionData_Client_Soldier : public FNetworkPredictionData_Client
{
public:
    FNetworkPredictionData_Client_Soldier(const UCharacterMovementComponent& ClientMovement);
    typedef FNetworkPredictionData_Client Super;
    virtual FSavedMovePtr AllocateNewMove() override;
};
nova wasp
#

we can't see the red lines, also if you are just not able to compile just ask in #cpp

pliant cypress
#

problem on client side

#

can't understand?

#

not able to sprint

nova wasp
#

you need to reason about what is happening

#

it looks like corrections are occuring so you need to consider if the server version is doing the same thing

#

the cmc is ulitmately just playing the same saved moves back on both sides and trying to get close, if it doesn't get the same information it cannot resolve the same position

rotund linden
#

Hi! I want to separate the hands in the first-person view of my multiplayer game. In the local view, I attach the fishing rod blueprint to each player's FP hand, and if not, it attaches to the third-person hand. In the FP view, the fishing rod is in a different location than in the TP. How can I replicate the hook on the end of the fishing rod? When I replicate movement of the bp_hook, the hook is in the same place in all players, but because the fishing rods are in different positions, it appears incorrectly in either the TP or FP. Furthermore, because the TP has physical animation and locomotion animations, the fishing rod is constantly moving, while in the FP view, it remains stationary. Is there a way to do this?

pliant cypress
#

It's the client side

#

I did watch cmc architecture video to understand it, but a bit confusing

#

https://discord.gg/uQjhcJSsRG
In this video I go over the architecture of the CMC to outline a high level understanding of the processes performed by this component.

Helpful links for understanding Client-Side Prediction:
https://www.gabrielgambetta.com/client-side-prediction-server-reconciliation.html
https://www.gabrielgambetta.com/client-s...

▶ Play video
#

I was following his next part for sprint so after I can implement forward only sprint

#

Same problem as mine. You just need to override the FAttachment Rules

#

And leave it empty

#

So then you can implement your custom Attachment setup

#

Such as for simulated proxies, you can attach the rod to TP mesh and for player, attach to hand

pliant cypress
#

Override this function in AActor so you can setup the rod attachment correctly

rotund linden
pliant cypress
rotund linden
# pliant cypress Perhaps the Location of Hit isn't replicating well?

The hook is attached to the rod with a physics constraint. I use replicate movement on the hook, and the position is the same for everyone. But because the rod is positioned differently in different views, in third-person view, it looks like the hook is floating in the air. You can see it in the video. This is because there are animations in third-person, but not in FPS and the rod positions don't match.

#

Since the hook doesn't move in FP, it doesn't move in TP either

pliant cypress
#

Can't know until we see code.

grand prism
# pliant cypress Perhaps something blocking it?

Bro, the problem has nothing to do with that. I’ll explain it to you in the simplest way because you didn’t understand. In FPS, the hook just stays in place and doesn’t move up or down. In TPS, since there’s an idle animation, it moves up and down, but because the hook is fixed, it looks like it’s hanging in the air. There’s nothing blocking it or anything like that

#

I think this is a bit too complex of an issue for you. Thanks for your help, but our problem doesn’t have a simple solution or logic

#

Lol, you’re just making the job look more complicated

pliant cypress
#

Gotcha

#

Perhaps your FP hand is blocking the Rod since it cannot be seen, the collision exists

rotund linden
rotund linden
#

i turned it off

pliant cypress
#

Then sorry, it's really a complex for me.

grand prism
#

The problem comes from the animation difference between FPS and TPS, lol

rotund linden
crisp shard
#

I just discovered that The Finals are doing 100 percent sever side movement and logic and I’m baffled.

First question is how would I be able to even test this myself? Having movement fully sever side for example, and 2 how can a fast paced game like that feel good and be 100 percent server authoritative?

crisp shard
#

Hearing that they would most likely not even be using ue for the server. But this confuses me as I have no ideas how that would be setup?

thin stratus
exotic wasp
#

it would feel absolutely terrible

#

there's no way to have server side only movement not feel laggy with any network latency

pliant cypress
lament flax
#

in the video the finals creative director (iirc the guy speaking on the devlog) said they used server AUTHORATIVE, this doesnt mean there is no client prediction

#

@crisp shard

blazing bear
pliant cypress
#

Tbh it's bit hard to understand CMC

#

Prediction data and saveddata

blazing bear
# pliant cypress how can i fix this?

The standard way of fixing this is to spawn a local non-replicated version of the weapon actor the server attaches to you, and keep track of it to destroy it when the actor is deattached/destroyed. You do this on OnRep of the currently held weapon property.

#

But as long as OnRep_AttachmentReplication works for you, it's all good

pliant cypress
#

Now the sprint is currently my issue. I understand it's server side only

#

And also Crouch

blazing bear
#

Or just add it as a plugin

pliant cypress
# pliant cypress And also Crouch

Though I didn't overloaded or made a custom, just added Crouch and checked. Worked fine on server but it didn't crouched on client side. But a jitter like server rejected the client's Crouch validation

plain vapor
#

Hi, could you please tell me how to fix an issue where, whenever any
client disconnects from the Listen server, the server crashes with this error?
What should I check? I really need help…

Engine version: 5.6.1
Plugins are shown in the screenshot.

The error in the crash reporter:
`Assertion failed: MappedClientConnections.Remove(ConstAddrRef) == 1 [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\NetDriver.cpp] [Line: 6918]

BackroomsLostRunners_Win64_DebugGame
kernel32
ntdll`

pliant cypress
#

Guys, I'm bit confuse between what things to do in C++ and in Blueprints.

After fixing sprinting and Crouch, I'll be working on ADS and Weapon Clipping. So I want to understand, since ADS is for local player but the crosshair or aim offset would be affected in future, should I do ADS in Blueprints or C++ ? How do you distinguish what to do when and when to use both together

#

Network related things to be for sure work in C++

crisp shard
blazing bear
crisp shard
#

i don't know c++ but if i did, i'd bascially make all classes and base systems in c++ and then i'd extend things in blueprint, but this is just instincts as i only make structs and enums in c++ rn... lol

lament flax
# pliant cypress Guys, I'm bit confuse between what things to do in C++ and in Blueprints. After...

It's not an either/or decision. Learn what makes C++ and Blueprints different, what they have in common, and how to use them together effectively. We'll also learn a thing or two about performance optimization and some basic software design concepts.

Read the article version: http://awforsythe.com/unreal/blueprints_vs_cpp/

00:00 - Introduction...

▶ Play video
haughty ingot
split ridge
#

noob question: for listen-server multiplayer game using seamless travel from lobby->game, where does one idiomatically store game state ? Controllers/GameMode/GameState are not the same across levels. Feels weird using GameInstance since that feels super-global

#

(if you're kind enough to answer, please use discord reply 😄 )

tender idol
#

There are other ways too with blueprint objects and data table maps.

lament flax
#

other stuff than game instance can "be transfered" between levels when using seamless travel
but as you will see some types are destroyed and recreated, but in c++ there are virtuals that you can implement to copy data

meager spade
#

You can keep actors across travel

#

Playerstate also has copyproperties

#

Can be done in BP alsl

#

Also

tender idol
#

Very cool

split ridge
#

cool thank you all. I suppose I'll identify the host user and keep important things in a struct or something on gameinstance until the session is destroyed.

#

i definitely read that article btw Fishy. It's amazing.

meager spade
#

You have subsystems

#

Should use them

split ridge
#

was also looking around in World .cpp to verify how GameMode copies stuff around

meager spade
#

It doesn't really copy stuff across world travels.

split ridge
#

yeah I'll use them eventually right now I'm super green with UE so just figuring things out and setting up the boring parts of a "game"

lament flax
meager spade
#

Yes ofc

#

But it's fresh

split ridge
#

yeah and can override stuff to copy data there. but was thinking about gamemode stuff, where the "game" is the same but the mode class wil change

meager spade
#

Localplayer doesn't get destroyed

#

We use copy properties I'm playerstate for seamless travel

haughty ingot
#

Just root every object sweeney_activate

split ridge
#

yeah feels lame storing non-player game data with the "server player" tho IMO

meager spade
#

Gamestate also had that ?? Can't remember

split ridge
#

(i'm coming from normal-ass day job programmer background)

meager spade
#

I don't progran

#

I vibe code

split ridge
meager spade
#

Have to be with the times

haughty ingot
#

It’s true, I’ve seen it

lament flax
#

If not absolute, you can set a new game mode by adding the following option to the URL :
?Game=Full/Path/To/MyGameMode

split ridge
#

been having fun digging around in UE5 source. been not having fun learning how fucked up C++ is as a language after not touching it for 15 years

#

UE++ is pretty cool tho

haughty ingot
#

Always ping him when you tell him how long you love c++.

quasi tide
split ridge
#

was digging around in the delegatesImpl code for a bit yesterday 😵‍💫

haughty ingot
meager spade
#

C++ is bad really. Es0eciallly compared to modern languages etc. Hence why they ate trying to make it more relevant.

haughty ingot
#

??

lament flax
#

i like c++

quasi tide
lament flax
#

(UE c++)

haughty ingot
#

std::move_only_function baby

split ridge
#

yeah UE C++ seems pretty decent tbf.

meager spade
#

It was stale for years last few tears they have really tried yo make it relevant. Instead of being stuck I'm 1990s

meager spade
#

My phone auto correct sucks

haughty ingot
#

Still looks like a windows 95 application

split ridge
#

was trying to trace whether .Broadcast for dynamic multicast from C++ -> blueprint did any memory copy and utlimately got lost in the sauce

haughty ingot
#

If you’re dealing with Blueprints you’re not wrong like 99% of the time if you just assume there is some copying or memcpy in there somewhere

split ridge
#

yeah it was mostly curiosity. because I noticed the BP events didn't generate event params unless I declared as const TArray<foo> & and got to thinking whether that reference was maintained.

#

(way off topic here heh)

latent heart
lament flax
split ridge
#

oooh nice

lament flax
#

@thin stratus might be worth a pin

split ridge
pliant cypress
pliant cypress
blazing bear
#

also bp nodes trigger my ocd lol

pliant cypress
#

Though my most of the work is done in C++

#

And I prefer it too

pliant cypress
#

End up making spaghetti

thin stratus
blazing bear
#

forgot what it's named

thin stratus
#

That's AnimGraph stuff

#

It's more about the GameThread EventGraph iirc

blazing bear
#

on my anim bp I got a few functions that access properties

#

ah I see

blazing bear
narrow prairie
#

i use states for my animbp and let that just do the work instead of animation blueprint update node

#

exi is a god so he probally knows more as me, but that seems to work for me

#

need to learn c++ for the animation sharing plugin though

#

my animations are not that important for the style im working on

fallen fossil
#

is there way to make interface functions with Server / Remote flags?

🤔

viscid heart
# blazing bear Can I do the multithread thing in c++ though?

Doing anim logic in c++ is so much nicer than BP. Just collect the data from GT in NativeUpdateAnimation and then do the logic in NativeThreadSafeUpdateAnimation and just use Live Coding when iterating. Wonder who started the meme that you need BP for animation logic and now every noob parrots it. Probably someone who doesn't even make games.

viscid heart
#

GT will be waiting for that slow ass BP.

gilded vapor
crisp shard
#

Random Q, but is tile based movement possible in unreal? Similar to RuneScape? Point and click but there are set “tiles” for movement

latent heart
#

Everything is possible.

crisp shard
#

Guess I’m asking “how” but that’s probably not a simple answer

latent heart
#

When you click, trace to the landscape (or whatever) and round to the nearest tile and tell your pawn to go there.

crisp shard
#

I guess you’d just have to manage tile size and really that’s that

latent heart
#

Pretty much

crisp shard
#

Not even manage, just decide tile size

latent heart
#

How you move the character and what you move them on is a bigger question, really.

crisp shard
zealous wigeon
#

lots of iris updates recently !!

crisp shard
zealous wigeon
#

They've been updating the multi server plugin to work with Iris. Def the future.

I don't know enough about rep graphs to know.. I've only recently started learning unreal

compact flame
#

How do I replicate variables from player state to the server? sever does not read the correct client set info.

blazing bear
dark edge
#

My units location is FIntVector2(12,32), that means it should be in the world at FVector(1200.0, 3200.0, 0.0)

#

Just have some functions to convert from world to tile and back and voila

#

the world to grid conversions already exist

#

but it's trivial, it's just a divide and round

crisp shard
#

are you doing this yourself ?

#

for your project/game ?

dark edge
#

Kind of

#

not the tile based movement but an abstract tile representation that gets turned into 3d stuff

#

Could easily add movement stuff to this tho

crisp shard
#

bit of a personal take, but i am slightly rethinking all of my movement mechanics, as i feel realtime movement done properly is going to be a bit more difficutl to get correct in the way i'd like. i have solutions avaialbe like GMC and maybe getting into custom movement component stuff, but it's just out of my league at the moment and im kind of thinking of changin movement completely.... but i could just be tweaking

dark edge
#

oh btw if you want a nice queryable way to ask "what is at this grid location" try a map of IntVector to Thingy

#

then it can be sparse

#

My one recommendation if you go a grid based approach is to have the visuals FOLLOW the grid. That is, moving a thing should be setting its grid coordinates, which happens instantly, then the visual stuff happens in response to that.

#

A bit like a chess game, your piece instantly moves, but the cosmetics layer shows a nice sliding animation etc.

#

It's kinda like a model and a view

#

the model is the abstract "game" which is the grid representation etc. The view is the 3d actors and animations and timelines

crisp shard
dark edge
#

The query "where is my character" shouldn't return some partial grid coordinate because they're animating right now

#

as far as the Game™ is concerned, your character is at an integer grid coordinate.

#

Anything else is just cosmetics on top

crisp shard
dark edge
#

What's the game?

crisp shard
#

dealing with latency and movement w combat is just ... very challenging to get to feel good

crisp shard
dark edge
#

yeah

crisp shard
# dark edge yeah

tbh, i couldn't really answer this question. which might be a bigger problem lmao. but it's an open world with the standard RPG like mechanics, location based states (safe zones, world zones, and a "wilderness"). pvp combat, you can start different game modes as well, a duel arena mode (1v1, 2v2, etc) and another mode i call "release", essnetially like capture and release but 2 sides and they both have their own objectives. these games can be started in the open world and it will "block off" those areas during game

#

i think i've gottent o the point tho, where i need to scale back a lot of things, and hone in on what i want . but movement is something that really bothers me, and i dont know if it's the movement or like i said above, im just tweaking lol

#

it's set in a "suburban" like area tho

dark edge
#

How much of that works right now

crisp shard
#

everything i mentioned works

dark edge
#

Yeah it all depends on what the combat is meant to feel like i guess

#

that doesn't scream grid based

crisp shard
#

there's some more than that, but they all dont connect yet, so hard to say they are importnat to the overarching gameplay as of yet

crisp shard
# dark edge Yeah it all depends on what the combat is meant to feel like i guess

right. what i love the most is how i've built the scaling of levels and combat items, but they are super simple but everthing can be upgraded and you can levelup skills, and the combo of this does add some interesting dynamics to combat, but i feel like i've based it too much off of what i loved about runescapes combat, without it being runescape based combat. so, it's realtime, and i just don't think it feels that great ? lol

dark edge
#

maybe look at CRPGs

#

what's the viewpoint and controls?

crisp shard
# dark edge what's the viewpoint and controls?

it's third person pov, and characters are actually 2D sprites, but in a 3d world. controls are semi standard, although i do have flying... which of course would not work in a tile based movement setup lol

crisp shard
dark edge
crisp shard
#

ahhh, i've actually never played

dark edge
#

Position = 3,4,1 is flying

#

3,4,0 is on the ground

#

3,4,-1 is below ground (somehow)

crisp shard
dark edge
#

or underwater

crisp shard
#

that makes sense tho, and if you saw my current world, it's probably not the most "tile based movement friendly"

#

as, im sure you'd probabaly want a semi flat world

dark edge
#

yeah I don't really feel like tile based is the play here tbh

#

click to move or continuous movement?

crisp shard
#

it's probably not, like i said about... prob just tweaking

crisp shard
dark edge
#

I'd just keep that and tune it if that's what the thing was designed around

#

click to move or grid based movement can work but they really need a lot more depth in the other systems to be attractive. Nobody wants to play grid based Mario for example

crisp shard
#

yea, i think i do need to fine tune the movement in general, which is compltetly standard as of now apart from sprinting and flying (probably incorrectly) done in cpp/custom movement component

crisp shard
#

and real time combat / etc in theory is more fun, but the output of dmg, and reciving dmg, is not as simple to make feel good . at least not like the games i've played

#

bascially struggling with the most common of issues, and it's nothing that crazy, but i do want to get movement to feel better and make events like combat be less about crazy movement and more about levels and items

#

and nothings broken, im just being critical i think

#

im realizing im semi venting here gentlemen, appreciate the discourse tho

gray blade
#

hey yall im looking for networking advice, tldr I have a randomly generated dungeon and im spawning and destroy room actors on the server and then looping them to replicate with a delay. I pretty much have put delays in everything but after it finishes it cause the server to freeze which I presume the host sending a backlog of actors to the clients. Im just looking for any advice to go about solving the freeze

quasi tide
#

Just replicate the random seed and let everyone generate the same level layout locally.

gray blade
fierce forge
#

Can almost guarantee that it's a rewrite that's worth doing. Not only will you get rid of your current issue, there'll be a LOT less to replicate.
The only thing you need then is for each client to tell the server when they've finished their respective generation, so that the game doesn't start until they're all ready.

dark edge
#

That is, the seed results in some door actor being placed somewhere. Can it be replicated, just as if it was placed on a saved map in the editor?

full knot
#

Hello friends! Sorry this is probably extremely simple, and yet I hit a wall
When a player is eliminated, I want them to unposses their pawn and possess a spectator pawn instead. This has to happen from the server's gamemode, which decides which player should spectate or not depending on the situation

#

There seems to be no easy way to do it:

  • Changing possession of the controller on the server does nothing, because the controller is not replicated
  • Overriding player state in C++ to set "bIsSpectator" to true, changes nothing (do i have to do something after that?)
  • Restarting the player after setting their player state to bIsSpectator does nothing either
toxic cobalt
#

i have a widget component on all bp_firstpersoncharacter that replicates and is designed to appear for all players. for some reason, the host cannot see these widget components, only clients are able to see it. the clients can see the hosts widget, the clients can see other clients, but the host cannot see any. any idea?

meager spade
#

server is the only thing that can change possessin

#

so server just tells the controller to possess X pawn

#

not sure what the issue is

full knot
# meager spade not sure what the issue is

The issue is it does nothing 🙂
On the gamemode script, I spawn a spectator pawn, then I make the controller of the client possess it - nothing happens from the clients POV. In standalone mode it works, but not in client mode

meager spade
#

then your doing something fundamentally wrong

#

i cant see your code/bp

#

the spectator pawn needs to be replicated also

full knot
#

Thank you for informing me I'm doing something fundamentally wrong. I will post my Blueprint shortly

meager spade
#

we have spectators working fine

#

(though we dont do it in the gamemode..

full knot
#

I'm sure many people do! I'm sure it's very simple to do, actually

#

This is why I'm confused I've been trying it for more than an hour by now and no matter what approach I take I don't get the expected result

#

This is a very simple example of what I did that didn't work - we are in the gamemode here
When the player "dies" the server calls this function

#

Note that I've succesfully broke in there with the debugger and can assure you the server is executing this code

#

In fact, in standalone mode, this works gracefully. In multiplayer mode, running a client, the client does not possess anything when this code is ran. Whatever possession occurs on the server for that controller, is not replicated to the client

#

You seem to have a lot of experience with Unreal, so I've read up about how Controllers are not replicated per se but their states are - so I've been supposing that calling possession on the controller is useless from the Serverside because the Server's controller instance is not the same as the Client's controller instance for a same client. This is why I've been trying my luck with PlayerStates instead as they are shared between client and server

#

However setting bIsSpectator & bIsSpectatorOnly on state, despite that the change is replicated, does nothing more than the BP I've shared above

#

By all means if you have a fundamentally right way to approach this problem that would make spectators work simply, please share it with me - I believe I've exhausted the first two pages of every google search I could find

toxic cobalt
#

i have a widget component on all bp_firstpersoncharacter that replicates and is designed to appear for all players. for some reason, the host cannot see these widget components, only clients are able to see it. the clients can see the hosts widget, the clients can see other clients, but the host cannot see any. any idea?

fallen fossil
haughty ingot
# full knot This is a very simple example of what I did that didn't work - we are in the gam...

Starting from the top, and I apologize if these questions seem basic, simple, or have been asked.

1:) Can you show that the server is the context that’s calling this function?

2:) Can you show that the player state you’ve passed in is the correct player state?

3:) Can you confirm if the spectator pawn is the one that’s included in the engine, or one of your own?

What actually happens when you call this function? Nothing? Does the viewport of the client change? Do you get errors, warnings, etc? It’s difficult to debug with the limited information you’ve provided

full knot
# haughty ingot Starting from the top, and I apologize if these questions seem basic, simple, or...

Thank you for your answer, no problem 🙂
Sorry however but since I've been at it for hours I've ended up finding another solution for my problem - I simply unpossess and set the view position on the client at the desired position (it's a static shot of the level). It was simply too much hassle to make it work and no resources I could find online provided relevant help 🙁

  • It was indeed the server calling that function, because it's Gamemode - and that is only executed on the server (clients get side effects & state changes)
  • There is only one player whose state gets passed so it couldn't have been another one - moreover i was monitoring the two instances of the game on the same screen so i would have seen if another player suddenly spectated
  • The spectator pawn was one of my own but the one from the basegame also did not work
#

Hopefully if somebody else stumbles into the same problem they'll have more luck fixing it than me

toxic cobalt
#

i found the issue

#

when i set visibility for the widget, it doesnt work for the hostr

fallen fossil
toxic cobalt
toxic cobalt
#

but even when the host is in the conditions where it can see the widget, the "set visbility" node doesnt work

#

i tested it, it runs through the code, its just that it ignores the set visibility for the widget

#

any idea why @fallen fossil

tardy fossil
toxic cobalt
#

Struggling lots

toxic cobalt
#

The widget is a component on every BP first person character

#

It only comes visible to a player when they are close to another player

#

when they’re far, the widget disappears

#

This works just fine for all players except the host

#

For some reason, even when the host approaches another player, the widget still won’t appear

toxic cobalt
#

The set visibility, it never takes place for the host

#

@fallen fossil is that helpful?

fallen fossil
#

Where do you run this code?
Where is widget spawned?
Where u want to see widget?

#

Do you have more than 1 widget?

toxic cobalt
toxic cobalt
#

The widget is spawned as a widget component in BP-first person character

#

The code I sent, where visibility is changed, is ran inside actor

fallen fossil
#

uh, it though you meant components

toxic cobalt
#

“On player widget”

fallen fossil
#

is your widget even visible before hiding?

toxic cobalt
#

It’s not

#

It gets set visible

#

When under conditions

#

It works for clients

#

Even when I set it default visible, the host still cannot see it

#

Even when its default visible

fallen fossil
#

which net mode u run ?

#

Try seeing widget without interaction first. did u attach them to viewpoer?

toxic cobalt
#

Clients

toxic cobalt
#

I’ll send a video one sec

fallen fossil
tacit furnace
#

hi how can i clients run "run on server" events on actor on world

fallen fossil
tacit furnace
fallen fossil
#

set owner must be executed on server ;d

#

also actors must have flag to replicate

tacit furnace
fallen fossil
toxic cobalt
#

@fallen fossil left is client, right is host

tacit furnace
toxic cobalt
#

See how it should be? And how it doesn’t work for the host

fallen fossil
#

I guess they show somewhere else xd

toxic cobalt
#

I delted them now

toxic cobalt
# toxic cobalt

But the print command confirmed that for host, this line of code runs, but doesn’t change viability

thin stratus
# toxic cobalt

You should install ShareX to grab proper screenshots and short recordings.

#

Recordings and pictures like this make it really difficult

toxic cobalt
#

See in the corner the print text confirmed that it ran through the code

#

Just the visibility didn’t change

toxic cobalt
thin stratus
#

Would be appreciated.

toxic cobalt
# toxic cobalt

Does this recording work for now? Or do I need to install the software. The whole point is just to show that for the host, it is activating the code to show the widget, but for some reason it stays invisible

thin stratus
#

What you need to do is share proper screenshots of your BP code that is relevant to this. From start to end.

#

The video just shows the problem, but without seeing what you are doing we can't really help.

#

Unless one of us has a 🔮 sitting around.

toxic cobalt
haughty ingot
toxic cobalt
#

thats most of it @thin stratus

#

some other small stuff but thats most ofg whats going on here

#

Or @fallen fossil if ur still available

thin stratus
#

What calls the Trace function?

#

@toxic cobalt

#

There doesn't seem to be any replication related logic involved here. Should each player only see the widget if they themselves get close to the actor or should it show up on all of the players if just one of the players gets close?

toxic cobalt
toxic cobalt
#

No sorry

#

Event tick in the AC_InteractionTrace

#

And tick is only activated by BP first person character

#

heres the logic @thin stratus

fallen fossil
rancid current
#

Hey guys,
I've got these physics in my game where getting bonked sends you flying a bit, how can I accurately replicate the position of where the skeletal mesh went? Eventually Clients go out of sync somehow after a few bonks.
Also any tips on making the physics nicer? Currently I am only simulating the pelvis on the server and the rest of the bone physics are done locally, which.. is not very nice to be honest, any one got any ideas to make this more wow? : )

So characters stand up after getting bonked, so they need to stand up for all players at the location where the ragdolled mesh is.

Should I hide my current mesh and spawn a different actor where the skeletal mesh is the root of the actor for specific replication of ragdoll location?

toxic cobalt
#

this is in the arctor component its just a function inside of it

nova wasp
#

#cpp message
an example of how a commercial game solves something similar

split ridge
#

learning how to wire up server travelling. Got some code running on the listen server to seamless travel.

GetWorld()->ServerTravel(TEXT("/Game/ThirdPerson/Lvl_ThirdPerson"));

Works in PIE, (both with and without enabling seamless in PIE). When I package dev build, I get a failure that it cannot load the map. What have I messed up? (Just using the third person sample map as the destination).

#
[2025.09.21-22.44.24:178][ 26]LogWorld: Error: Unable to travel to '/Game/ThirdPerson/Lvl_ThirdPerson' - file not found
[2025.09.21-22.44.24:178][ 26]LogGlobalStatus: Warning: UEngine::BroadcastTravelFailure Travel failed, type: ETravelFailure::InvalidURL, reason: "Invalid URL: /Game/ThirdPerson/Lvl_ThirdPerson?Name=Player?Listen"
[2025.09.21-22.44.24:178][ 26]LogNet: Warning: Travel Failure: [InvalidURL]: Invalid URL: /Game/ThirdPerson/Lvl_ThirdPerson?Name=Player?Listen
[2025.09.21-22.44.24:179][ 26]LogNet: TravelFailure: InvalidURL, Reason for Failure: 'Invalid URL: /Game/ThirdPerson/Lvl_ThirdPerson?Name=Player?Listen'```
nova wasp
split ridge
#

i am not certain. I am very fresh and may not have set up things properly

nova wasp
#

also don't write in the level as a string in code if you can avoid it here...

split ridge
#

yeah I was thinking about wiring it up as a BP reference but to start I wanted to just test it out.

#

how do people normally reference levels to CPP code

nova wasp
#

TSoftObjectPtr<UWorld> I guess

#

you could also just use the asset registry to find all worlds and list them out, whatever

split ridge
#

do most just normally do this in BP graph?

nova wasp
#

If that's easier, sure? This kind of thing is totally fine to do in BP if it exposes what you need

rancid current
split ridge
#

(btw turns out it wasn't being packaged, and for now I just explicitly added it in packaging settings)

toxic cobalt
# toxic cobalt

@fallen fossil @thin stratus any help further or do you guys not really know what to do

thin stratus
#

Pretty sure you call this from BeginPlay, right?

#

And that would be too early for your IsLocallyControlled check.

thin stratus
#

If it turns out that you are indeed calling it from BeginPlay, then I can tell you why it's affecting the Server but not the Clients.

  1. For the Server and Clients, the Pawn/Character is first fully spawned by/on the Server.
  2. Then it will be possessed by the PlayerController of the individual player, also on the Server.

Now, BeginPlay works slightly different for them.

  • For the Server, BeginPlay will call after 1. but before 2. This will lead to the Pawn/Character not having a valid PlayerController on BeginPlay, so IsLocallyControlled will return false.
  • For the Clients, BeginPlay will most likely call when the Pawn/Character gets locally spawned from replication, but the key difference is that the PlayerController will already be set, as the whole "Spawn + Possess" happened in the same frame on the Server and replicated down to the Client as part of the initial bunch.
    • There is a chance that this does in fact not guarantee that the Client will have a valid PlayerController in BeginPlay.
    • BeginPlay, on Clients, is controlled by the GameState being valid and having "InProgress" as MatchState replicated. That will trigger the general BeginPlay on the World. Actors that are newly spawned will check if the World has begun play already, and if so call their own. Otherwise, they wait on the MatchState kicking things off.

The result is, that your Server can't deduce if the Pawn/Character is their own or not.

Solution: Use "OnControlledChanged", or whatever the event is called, to check if the Pawn/Character is locally controlled, or rather as an entry point for your Setup function.

#

@toxic cobalt ^

mystic estuary
nova wasp
#

that's not a bad idea if you just send individual limbs

#

but it just seems a lot easier to just have one thing

mystic estuary
nova wasp
#

and if you can't get the velocity from the body instance somehow, you could easily just store the previous position and compare the distance covered over time

#

of course if you have to teleport this value must account for that

mystic estuary
#

I guess I should've tried searching for the keywords under the skeletal mesh component first 😅

Yeah, that works. I'm doing a little bit of ragdoll replication for my game as well, and I was only doing position and location, and it didn't look that good. Maybe replicating velocity will help it a little bit

toxic cobalt
thin stratus
#

I already told you what you can do instead of using BeginPlay.

toxic cobalt
thin stratus
#

Are you calling the setup code on BeginPlay?

toxic cobalt
#

It’s the same code, it’s all one system for interactions

thin stratus
#

Then the change is gonna have some effect either way, even if it doesn't fully fix your problem.

#

You shouldn't check IsLocallyControlled on BeginPlay.

toxic cobalt
#

Ok

thin stratus
#

If the issue or part of it still persists, then we can check further.

toxic cobalt
toxic cobalt
thin stratus
#

It's built in. Pawn/Character should have it.

#

Not sure about the exact wording, but something with Controller Changed.

toxic cobalt
thin stratus
#

Unless you are using a really old UE version..

toxic cobalt
#

Thanks so much bud

rustic ore
#

Hey all, what's the best way to spawn a non replicated actor with the actor bReplicates set to true by default?

thin stratus
rustic ore
lament flax
#

i got my suspicions

thin stratus
#

That's controlling the replication after all.

rustic ore
thin stratus
#

There is SetReplicates already.

#

Yeah, you could do that.

#

If it's decided by the spawner, then you can try spawning it Deferred and then setting that based ons ome condition.

sage lance
#

maybe you could make a child class where the only difference is that it doesnt replicate. spawn that when you dont want rep

thin stratus
#
AFPSProjectile* const NewProjectile = GetWorld()->SpawnActorDeferred<AFPSProjectile>(...);
NewProjectile->SetReplicates(SomeCondition);
NewProjectile->FinishSpawning(...);
pine cloud
#

Hey, has anyone played around with Unreal's replay? The DemoNetDriver. I thought it'd replicate multicast events during a replay but they seem to not be triggering. It's for a singleplayer project though. I tried to see how they implemented replays in the Lyra project but it's too complex for me to understand.

lost inlet
pine cloud
# lost inlet Well it's not going to be easy since replays will only really work if your game ...

I'm calling custom events (set to multicast) in my thirdpersonchar in hopes that they'd get recorded into the replay. The movement replays well, and I managed to trigger some event using repnotify. But i hoped there was a simpler way with the multicast... Having a repnotify for every event doesn't sound like a good aproach.

I saw this too: https://forums.unrealengine.com/t/multicast-not-called-in-replays/381362/2

Epic Developer Community Forums

Hi JB, Mutlicast function calls should get recorded - UDemoNetDriver::ProcessRemoteFunction handles saving them out. Can you set a breakpoint there and see if that function is getting called?

plucky geyser
#

I'm currently creating a multiplayer project which involves frequent changes in speed (sprinting to crawling to walking etc). I was changing walk speed by setting 'max walk speed' as you would in single-player, but I noticed that when i simulate a bit of ping, you get rubber banding , because this is server-authoritative and not client-predictive.
However, by using the character movement component's crouch function, there is in-built client prediction, so the change in speed is smoothed out.
All I want to do is add some more movement modes, which function like 'crouching', and are identical to walking but have preset max speeds, and client-predictive speed transition when you swap between them.
Unfortunately, it looks like you can only add these by editing your character movement component in c++. If anyone would be willing to walk me through that process, I would really appreciate it - I feel like if you know what you're doing it should take 10 minutes, but I don't so I've been at it for days and chatgpt hit a wall!

lost inlet
#

Otherwise can't say I've had an issue

#

And for that specifically, was overriding CallRemoteFunction

twin vessel
#

How can i lower the fps threshold for cmc to combine moves?
My laptop does not allow going over 60fps and i need to test if combining moves works fine

Edit: should be GetClientNetSendDeltaTime

dry dove
#

anyone working with custom c++ server?

plush mauve
#

Does anyone happen to now, if I replicate a large array of class references, how much data does each class reference actually take? Is it just a memory address? If so how does that work when replicating, given the server and client will have different memory addresses?

fossil spoke
#

Which is mapped to Objects

#

These are always the same for on disk Objects

nova wasp
#

In iris it will send the full class path once and then negotiate a shared tiny ID

#

it's not just a memory address... it has no clue what the memory is on the other side

#

so it must resolve the path

#

at least all asset-style classes will work that way afaik

#

You should just use network insights to measure to see if it's even an issue

plush mauve
nova wasp
#

If you do find that there is too much data being sent (for some reason) you could just try to bundle multiple assets together under one asset if possible

fossil spoke
#

If it hasnt been mapped yet, it will send the full path

#

This allows the engine to load the class first

#

If it hasnt been used yet

nova wasp
#

It would be unlikely for this to be a big cause for bandwidth issues unless you have thousands of unique things that all must be sent at once imo

#

or have really restrictive bandwidth needs

plush mauve
#

OK thank you both! Much appreciated.

nova wasp
#

One thing I do wonder is if you could basically "pre-heat" the mappings

#

but I really doubt there's much need for that

#

If you wanted to you could make your own ultra simple ID to class mapping

fossil spoke
nova wasp
#

so they spread out the cost more

fossil spoke
#

I think the best you could do is just load in assets before they need to be referenced

nova wasp
#

yeah probably

fossil spoke
#

I know thats what we do

nova wasp
#

and yeah the forced "we need this loaded RIGHT NOW" is a far greater problem than bandwidth of sending the class path

fossil spoke
#

Like, we preload all Weapons, so they dont need to be fetched during flight

nova wasp
#

that's a good idea

#

that way a new one doesn't appear by surprise and force a hard load

fossil spoke
#

Its much easier to do that now, since RAM is pretty inexpensive.

nova wasp
#

Unfortunately I am working on a PS4 game lol

fossil spoke
#

Yeah, well what prompted us to do it was that we came across an issue where some of our Weapons would not load on Clients when they were replicated by SImualted Proxies.

#

We found that they were just never being loaded by the Class getting repped

#

So we just preloaded them all

#

Which has other benefits.

nova wasp
#

Iris does have a weird extra mode where you can actually still async load referenced packages, they just defer the entire packet payload (fairly complicated but it's just storing the data for later)

fossil spoke
#

Yeah righto

#

Im not sure how it all is in UE5

nova wasp
#

but even in that case you can still have mistakes happen

#

some things just force a hard load

fossil spoke
#

Id be curious to know if our issue with Client loads is fixed in UE5

nova wasp
#

GAS gameplay cues are a big source of "oh god spawn this right now"

#

for example

#

depending on how they are set up

fossil spoke
#

Yeah I hate that about GCs

nova wasp
fossil spoke
nova wasp
#

yeah tbh I can't blame you for just pre loading them

#

even if it's a bit of a bodge it fixes multiple issues

thin stratus
fossil spoke
thin stratus
#

Understandable

#

I just always get reminded of trying to add a second nav mesh for The Ascent only to face the harsh truth of 300-600MB RAM being lost xD

#

The previous Xbox generation wasn't happy about that idea.

spring lotus
#

Anyone have any tips for me to get smoother movement in UE5.6 multiplayer? I'm finding that clients are stuttering around when their frame rate is higher than the server tick rate (which I've set to 60).

I've tried to increase NetworkMaxSmoothUpdateDistance & NetworkNoSmoothUpdateDistance to 200 and 300, but it's not really helping.

Capping the players frame rate to 60 entirely fixes the issue but I'd prefer if the player could have whatever frame rate their PC lets them run at

thin stratus
#

And is it the movement that stuttering or the animation?

gritty nebula
#

hey does anyone know of any resources teaching how to make stuff your pawn can enter and control like cars, tanks, jets, and mounted machine guns? Bonus points if it uses gas!

#

im sure i could figure out something on my own, but i want to know what the best practices are for things like these beforehand!

spring lotus
# thin stratus Custom movement code or just the unchanged CMC?

Custom movement where I orbit around an actor, no animation plays, just that the set actor location and rotation is super stuttering on higher frame rates

void UPlayerAimComponent::ApplyOrbitAtAngle_Common(APawn* P, const FVector& PivotLoc, float AngleDeg, ETeleportType TeleportType)
{
    if (!P) return;

    const float Rad = FMath::DegreesToRadians(AngleDeg);
    const FVector2D Offset2D(OrbitRadius * FMath::Cos(Rad), OrbitRadius * FMath::Sin(Rad));

    FVector NewLoc(PivotLoc.X + Offset2D.X, PivotLoc.Y + Offset2D.Y, P->GetActorLocation().Z);
    NewLoc.Z = FindGroundZForPawnAtXY(NewLoc, PivotLoc.Z);

    const float YawToPivot = (PivotLoc - NewLoc).ToOrientationRotator().Yaw;
    const float FinalYaw   = YawToPivot + MeshYawCorrection;

    P->SetActorLocationAndRotation(NewLoc, FRotator(0.f, FinalYaw, 0.f),
        /*bSweep=*/false, nullptr, TeleportType);

    if (ACharacter* Char = Cast<ACharacter>(P))
    {
        if (UCharacterMovementComponent* Move = Char->GetCharacterMovement())
        {
            Move->bOrientRotationToMovement     = false;
            Move->bUseControllerDesiredRotation = false;
        }
        Char->bUseControllerRotationYaw   = true;
        Char->bUseControllerRotationPitch = false;
        Char->bUseControllerRotationRoll  = false;
    }

    if (AGolfPlayerControllerBase* PC = GetOwnerPC())
    {
        PC->SetControlRotation(FRotator(0.f, FinalYaw, 0.f));
    }
}
thin stratus
spring lotus
# thin stratus Are you doing anything in your CMC itself with SavedMoves?

Nah, I just call this function through these local and server functions, was hoping the local would fix how it looked on the client

void UPlayerAimComponent::ApplyOrbitAtAngle_Local(float AngleDeg)
{
    if (!OrbitPivot) return;
    if (APawn* P = GetOwnerPawn())
    {
        ApplyOrbitAtAngle_Common(P, OrbitPivot->GetActorLocation(), AngleDeg, ETeleportType::None);
    }
}

void UPlayerAimComponent::ApplyOrbitAtAngle_Server(float AngleDeg)
{
    if (!OrbitPivot) return;
    if (APawn* P = GetOwnerPawn())
    {
        ApplyOrbitAtAngle_Common(P, OrbitPivot->GetActorLocation(), AngleDeg, ETeleportType::None);
    }
    if (AActor* Owner = GetOwner())
    {
        Owner->ForceNetUpdate();
    }
}
thin stratus
#

Right, well, the 60FPS limit is usually combined moves, but if you aren't doing anything in the CMC, then that's not it.
The code you shared seems to be modifying the Transform of the Character, which is not really allowed outside of the CMC:

#

You are affecting the movement simulation with that and that causes corrections.

#

If this is all ControlRotation based, then you should only call this locally and only change the ControlRotation. Then set the Character to follow the ControlRotation. The rest should work automatically. There is no need to manually update the Character Transform or to RPC this.

spring lotus
#

Ok thanks, so I guess my per frame transforms are completely bugging out when the frame rates too high. I'll try change it now

spring lotus
spring lotus
thin stratus
#

If you need to move the Character predictively and it's not possible through setting MovementInput and ControlRotation, you'll need a custom CMC most likely.

radiant halo
#

I could use some help with replication. Cause different things are occuring on the host side than the client side. If anyone have some time to spare i would appretiate it a ton. Working on a school assignment.

mystic estuary
#

Hello, how would you guys go about attaching a character to another character in a way that the two characters wouldn't move too far away from each other (a few meters), and also let character A to move character B closer when character A gets too far, but not viceversa? E.g. constrain the two characters together, and let one of them drag the other one if they walk too far away?

radiant halo
mystic estuary
#

That way one character won't be able to move at all. I need the two character be able to move, but not too far away from each other as they're bound together

#

I'm talking about something like Chained Together, but with one character completely dominating the movement when the chain is stretched the most

radiant halo
#

what about some sort of tether like an invisible cable component?

mystic estuary
#

I don't think that cable component affects the CMC movement in any way?

radiant halo
#

maybe not

mystic estuary
#

I could always use normal physics constraint actor, but I don't think that it's deterministic, so it will cause desync between simulations. I'm not sure, so that's why I'm asking for opinions

sage lance
#

looking for some networking wisdom: if i put my maps in a struct will i be able to replicate them properly?

mystic estuary
sage lance
#

like a giant invisible box with collisions for your characters

sage lance
wicked whale
#

Hello everyone. I'm facing a weird issue with SetActorRotation in my multiplayer tests. I have a listen server and a connected client in a PIE session. If I call setActorRotation for the player in the listen server, it works as expected and both the server and the connected client see the correct rotation. But if that is called for the player in the connected client, the rotation looks correct in the client, but not in the server. I do see a rotation change in the server but it's completely wrong. I added a log right after the call to SetActorRotation, and in the log the rotation has the right value in both client and server, which is even weirder. Does anyone know what can cause that?

stoic lake
#

How would I go about playing a sound on an actor component that's attached to a character, only for the client that owns the character. Without having to go inside the character to call an owning client event

#

Im running into the component being owned by the server, regardless of what its attached to

wicked whale
dark edge
#

Not difficult in concept, difficult to do that in the framework of the CMC and make it play nice with all the prediction and correction going on

dark edge
bronze meadow
#

I’m not sure if this is multiplayer or online subsystem but I’ve heard the project cannot be online multiplayer if the projects is blueprints any validity

lost inlet
#

2nd "but I've heard" today. of course you can do multiplayer games in BP-only projects. not like I'd recommend it, and it's impossible to do any custom predicated behaviour with the CMC

radiant halo
dark edge
#

BP only Advance Wars, sure

#

BP only Battlefield, not happeneing

bronze meadow
bronze meadow
ember vine
#

can you use an FInstancedStruct for some polymorphic rpc pipeline ? or do you always need to explicitly have the struct as an arg

latent heart
#

You can use a base struct that all your rpc structs extend from?

ember vine
#

really ? i can just inherit a ustruct and theres no issues ? and just pass the base type ?

#

i just assumed it wouldn't be that easy

latent heart
#

I think you can, yes.

#

Or if you want to go a bit more ham, serialise it all to a TArray<uint8> 😛

#

We do that with a uint8 as a type id. Cos we just like doing that kind of thing.

ember vine
#

hmm, must be a way to do that while also using the UE NetSerialize functions u put on the struct

mighty trout
#

i am working on multiplayer game that connects player through steam and when i host the game and other player can also join the game but when i leave the game in between and host again clients can find my session but not able to join it ? I don't know why it is happening but when client restart its game it can join the game

bronze meadow
mighty trout
#

steam

bronze meadow
mighty trout
#

what

bronze meadow
mighty trout
#

any player can join or host sesssion
but the player who host the session quit the game in between and create another session then player can't join the session but they find the hosted session

verbal ice
#

Does Iris have a way of preventing a player from receiving actors at all?

#

I.e. I want the player to pretty much have everything irrelevant to it (except its player controller/player state, and maybe game state)

#

I'm doing some tomfoolery to make the engine think runtime spawned actors are statically loaded from the map (they're not) so I need to ensure the server doesn't try to send data about those actors to the player until they have the full map "generated"

#

I'm ensuring the names are stable for replication manually, so I just need to make it so the player doesn't get any data until they're ready

nova wasp
#

and net groups

#

as for this I am curious if you can defer them in another way

verbal ice
#

Yeah I knew about filters but it felt like the same thing as overriding IsNetRelevantFor() in all actor base classes and returning false for the player

#

i.e. janky, even though what i'm doing is really hacky, I feel like there's a better way

nova wasp
#

I vaguely recall the replication internals having some kind of way of deferring dependant packets but it's more for asset loading

#

Is the risk that these get sent too early and stuff falls through the map?

#

Why can't you just receive them and then suspend simulation/visuals until they are ready?

verbal ice
#

The engine yells that it can't find a statically referenced actor on the map

#

I'm tricking the engine into thinking dynamically spawned actors on the server & client are static/map-loaded

nova wasp
#

"I'm doing some tomfoolery to make the engine think runtime spawned actors are statically loaded from the map" - why? Is this to make them a stable name for speed reasons? to have them spawned locally?

verbal ice
#

I don't want them destroyed when irrelevant

#

I only want replication to stop, just like map loaded actors

nova wasp
#

hmmm... you can override actors being destroyed for network reasons to just not do that

#

you can tear off instead etc

#

I'm thinking there has to be a nicer way to do that that isn't outright fooling the engine... this is not exactly a weird thing to do to just filter

verbal ice
#

from some engine digging the only thing that tells the engine not to destroy them is if they're loaded from map/fully stable for networking

#

which you can manually mark an actor as, but the engine just whines with the whole "failed to serialize net actor" spam on client/server if it can't find an actor you're supposed to have loaded already

#

that's the part i'm trying to avoid

#

(+ well, I'd like if it the client didn't have other players/actors in the game running while they're spawning the map from the data they have anyway)

nova wasp
#

let me look around for a second

verbal ice
#

that's my research from last time

#

if it helps

#

Checked regular replication & Iris' way of doing it and they both have the same checks from what I gathered

nova wasp
#

Iris can deal with making an actor ending replication not be destroyed locally... but I don't know if you can easily make it restore that connection to the replicated object later

verbal ice
#

notable mention to the Epic engineer with the // Fixme: this should be a setting comment, yes I would've loved if this was just a setting on actors instead

nova wasp
#

I am really thinking filtering would just be easier here

verbal ice
#

So just filter out everything for players that are loading/generating the map

verbal ice
#

i.e. you can have a map loaded actor not be relevant but stay spawned, you just won't get networking updates for it until it becomes relevant again

#

95% sure at least

nova wasp
#

I'm just worried that making it think it's a stable named object will break other things

#

I feel like there has to be another way to do this...

verbal ice
#

If it's not a stably named object it'll also try spawning the actor on the client, which is what I don't want to do

#

I want to network the map data to the client manually, and then have it spawn the map actors with the correct "stable" names the server would have

#

That way I can also cache the map to a file on the client if it's not gonna change

#

and just read from it the next time the client connects

#

TearOff in Iris would kinda work but I don't see/think you can "re-attach" after that

#

like in regular replication, afaik you can't undo that action

nova wasp
#

I think if you got REALLY cheesy it might be possible to fool the bridge into using an existing object

#

to resolve the incoming network id

verbal ice
#

I'd still have to ensure the bridge didn't try to resolve before the client finished spawning the map

#

right?

#

seems like group filtering might be the way to go

#

The online documentation seems outdated, Iris source itself is... confusing

nova wasp
#

yeah I would really recommend just net groups and filtering because I think that would definitely work even if it's a bit annoying to have this ack step to wait on it

verbal ice
#

Some old info I had about those seems to be wrong now?

nova wasp
#

Does the map only get generated once per level?

#

Iris has changed a fair bit. Your best best is to use the actual existing network filters for guidance

verbal ice
#

yeah, the server generates the map/loads it from a file after opening an empty level, players wait for it to do so, then once it has, it sends the data to the players, who then need to spawn it locally

#

I'm wondering if I can make a filter group that only allows connections that have finished creating the level to receive the actor

#

And then I just pop that on most actors outside of the game state/player controller etc, anything I didn't lie about or need during that step

#

What I'm confused about is inclusion/exclusion groups. If I have an inclusion group, is the actor only relevant to connections inside this group?

#

Is exclusion just the inverse, where the actor is relevant to all connections except those in the group?

#

Past documentation made it seem an inclusion group only worked to negate a dynamic filter's exclusion

nova wasp
#

for example

[/Script/IrisCore.NetObjectFilterDefinitions]
+NetObjectFilterDefinitions=(FilterName=Spatial, ClassName=/Script/IrisCore.NetObjectGridWorldLocFilter, ConfigClassName=/Script/IrisCore.NetObjectGridFilterConfig)
#

also always double check iris docs for ini things... the only real reference is the actual live code/config

#

they have changed some of these ini config naming schemes in the past

verbal ice
#

I wanted to avoid a dynamic filter since you can only have one and using it for this seems like a waste thonkong

#

unless you can have multiple now

nova wasp
#

Ooh it's one a at a time? argh

#

I mean

#

you can just have it do double duty if it must do something else

verbal ice
#

well apparently one object can only have one dynamic filter

#

yeah

#

docs also say "don't use dynamic filters unless absolutely necessary since they're way more expensive than group filtering"

#

which makes sense since groups are just glorified bitmasks at the end

nova wasp
#

I think maybe a group for
Unloaded players
Loaded players

#

and these special actors that need to wait should only be in loaded players

#

then move connections that say they are done loading to Loaded players

#

is my guess

#

assuming connections can change group membership

verbal ice
#

If an object has just one inclusion group, does the engine default to exclusion for any connection not in that group?

#

yeah seems like they can

nova wasp
#

yeah I wish I remembered more but I am mostly familiar with the raw packet reading on the client part here more so than filtering

verbal ice
#

Hopefully we get more documentation soon since Iris is now Beta in 5.7

#

Surprised that's not on the roadmap

#

Also doesn't help that Iris looks like it's written by a mad scientist

#

I understand it's squeezing performance everywhere it can but it gives me whiplash every time I try to follow along

verbal ice
#

It's funny because it's easy to understand what they're doing, but trying to follow along is hard

#

and then you have stuff like this

fossil spoke
#

Well AFAIK the for(;DeletedObjects;) would be equal to a while(DeletedObjects != 0)

#

I guess it would be hard to follow along when they do silly choices like that lol

#

Not sure what the implications are of using one over the other.

verbal ice
#

From what I see in code comments, inclusion groups only override dynamic filters?

#
 * Inclusion groups are used to allow overriding the effect of dynamic filtering which can be useful to always allow replication of team specific objects for example.
#
     * Add a group to the filtering system. This group is used only for filtering out objects. Exclusion groups are processed before dynamic filters, those implemented by UNetObjectFilter. 
     * By default an exclusion group disallows replication for all objects in it. Use SetGroupFilterStatus to change the behavior.
#

this is for exclusion groups

#

so like, using SetGroupFilterStatus(), I can "invert" what they do?

#

this is so confusing

nova wasp
#

the internals are about as tryhard as you can get

#

they pretty much use 0 unreal containers

verbal ice
#

yeah

fossil spoke
#

Pedal to the metal

nova wasp
#

which sometimes makes sense but sometimes I question if they just didn't know about an existing unreal type...

verbal ice
#

I'm all for it, just wish the docs were a little less confusing

nova wasp
#

which in fairness it's not like I could rattle off every bitset template lol

verbal ice
#
 * By default an exclusion group disallows replication for all objects in it. Use SetGroupFilterStatus to change the behavior.

like what does that do? if I change the filter status, what's the new behaviour?

#

Epic please my sanity

#

from what I see in code, if I change the filter status to Allow it just ignores the filter?

#

super useful /s

#

like yeah sure maybe if I wanna disable a filter temporarily but rip

#

Wish I could just poke someone who works on Iris heh

halcyon ore
#

Not sure how to word this question.
But, is there anyway to disable whatever C++ auto fixes replicated actor refs?
Actor 1, with a ref to actor 2.
If you are near 1, but no 2, the var is invalid.
But, when you get near 2, it suddenly becomes valid, without any extra var replication from my understanding?

Or, is this some like innate "feature" of how object references work deep in C++?

verbal ice
#

What exactly are you trying to do?

halcyon ore
#

I'm not exactly sure what I'm doing yet.
Its for future experiments/ doing shit.
Just specific vars, not every var, since I know that'd break a ton of stuff.

verbal ice
#

I don't think you can disable that behaviour without some engine modifications

#

Unless there's a macro definition/cvar you can use for that, but none come to mind

verbal ice
# nova wasp I think maybe a group for Unloaded players Loaded players

After taking a break for dinner, I think I found out that it can be done simpler.

You can have one exclusion group, let's say PlayerLoadStatus, which excludes all connections by default.
Then, when a player has the map fully loaded, you can do ReplicationSystem->SetGroupFilterStatus(GroupHandle, PlayerConnectionId, UE::Net::ENetFilterStatus::Allow);

#

So yeah I was just being dumb

#

Just need to find out if inclusion groups override that

#

As long as they don't, then whatever

verbal ice
#

Does Iris consider all objects as always relevant by default?

median shell
#

I figured out that without a source build, you can still run the custom config in Shipping using the same -customconfig=Steam trick that you use with the editor.

I've been trying to find a way to make it work without the CLI arguments OR a source build though...

Seems like if you're building for multiple Targets, Epic just expects you to be building from source at that point.

dark edge
#

They do it for performance.
I do it because I learned a bit of C in 1997 and it stuck.
We are not the same.

quasi tide
exotic wasp
#

generic container good enough for most uses but certain applications benefit from a custom made container

#

SHOCKER

verbal ice
quasi tide
# verbal ice wee little bump

Search for siliex talking to Cedric about Iris. siliex talks about stuff like this I believe. It was a thread when Cedric was trying to figure out relevancy.

verbal ice
#

found it yeah

#

kinda helps, kinda doesn't? still confused somehow heh

#

i'll try it out

keen turret
#

Hello, I imagine this is a fairly common problem, but I'm still a beginner and have been trying to replicate my physics on an authoritative server for several days now. I'm using the Smooth Sync plugin, which works relatively well for all my mechanics, but when my clients' first-person characters try to push my physical objects, they experience constant rollbacks. When the plugin is disabled, my clients can push the objects without any problems, but their movements are jittery. I've tried changing the plugin settings, but it doesn't make much difference. Has anyone else encountered this problem? (i don't know if i should ask this in physics or multiplayer channel)

verbal ice
#

<@&213101288538374145>

obsidian ermine
keen turret
#

Yes that's the case in the video i sent

obsidian ermine
#

Vid shows your overlap moving it locally, then the server correcting, then the server overlap moving it.

keen turret
#

If i turn off the collisions locally, my client character will move trough the physics cube due to smooth sync interpolating it

obsidian ermine
#

Set your servers tick rate

keen turret
#

Okay done, so to allow only the server proxy to move my physics objects what am i supposed to do ?

obsidian ermine
#

might not need to adjust anything else

keen turret
#

The problem seems to persist :/

dark edge
# keen turret

because on your screen the box is in the way until the server moves it

#

What's the box's replication setup, just replicate movement and that's it?

keen turret
#

No the Smooth Sync plugin overides the Replicate movement

#

The smooth sync parameters

#

If i disable the Smooth Sync plugin and activate native movement replication, i don't have rollbacks anymore but the movement of my physics props avec very jittery

keen turret
#

Smooth sync interpolate and extrapolate my physics objects to have a smooth movement over the network, im guessing i have server corrections because my character is overlapping the physics props server side, but i don't know how to fix this, sorry if i'm being slow, i am new to physics replication and i am having trouble finding documentation

dark edge
#

Do you understand the problem though? On your computer, your character is in the future relative to the server's view of the world, but server authoritative movement of the box is in the past.

keen turret
dark edge
#

doesn't have to be much

#

right now on the client your character is running into a box it can't move because it's position is constantly being set from the server.

#

On the server the character is pushing the box just fine

#

but on the client, the character is predictively moving and running into the lagging box

#

Say your ping is 1 time unit

#

at T = 3, you are moving your character. At that moment, the server sees you at T = 2, and you see the box at T = 1

#

you are bumping into the box

#

networking is hard as shit, especially when you mix prediction with non-predicted stuff

keen turret
# dark edge I would suggest you first have a loose enough sync on the box that the client ca...

Okey i tried to loose the sync on the box but i still had rollbacks, it seems that the plugin is working differently from the network physics settings of unreal,for i don't fully grasp the working of all this networking stuff i might turn off the plugin for now and just use the native tools, it looks like it works better for character collisions. Thank you for your patience. If you have by any chance any good docs to learn games networking i'll gladly take it !

plush mauve
#

When testing multiplayer in PIE, is there any way to force a delay between when the server is started and when the client is started and connects?

thin stratus
#

Not for the first client I believe. But you can manually late join the second

#

It's a setting you can enable that then adds a button next to the start stop buttons for adding another client

dark edge
#

it's a nice middle ground between PIE and shipping

plush mauve
thin stratus
#

Project Settings or Editor Preferences

#

Late Join or something like that

#

Just search for it

ashen plume
#

A few cmc questions, recommended way(s) to handle cmc ground friction changes? Saw that i could add surface types to a project wide array somewhere as well i think? Lastly is there a combined friction calc type setting or type?

pliant cypress
#

i'm using this code for FABRIK, TP mesh. should i do the same but with IsLocallyControlled() for FP mesh??

if (bWeaponEquipped && EquippedWeapon && EquippedWeapon->GetWeaponMesh() && SoldierCharacter->GetMesh())
{
    LeftHandTransform = EquippedWeapon->GetWeaponMesh()->GetSocketTransform(FName("LeftHandSocket"), ERelativeTransformSpace::RTS_World);
    FVector OutPosition;
    FRotator OutRotation;
    SoldierCharacter->GetMesh()->TransformToBoneSpace(FName("hand_r"), LeftHandTransform.GetLocation(), FRotator::ZeroRotator, OutPosition, OutRotation);
    LeftHandTransform.SetLocation(OutPosition);
    LeftHandTransform.SetRotation(FQuat(OutRotation));
}