#multiplayer

1 messages · Page 178 of 1

neon summit
#

I think he means just printing thr value of the bool or using the blueprint debugger

#

Usually to do this you just set it to regular replication on the character and on update animation you get the bool from character and set the bool on abp

#

I'm not sure about repnotify

thin stratus
#

I mainly meant that you shouldn't inform everyone manually of the boolean change in the OnRep

#

Either have other systems ask for the boolean, or bind to a Delegate you can call from the OnRep.

#

So your Server doesn't have the AnimBP value as true?

#

You aren't setting it to false anywhere else, right?

native warren
thin stratus
#

Can you, inside the AnimBP EventGraph, get the Character (TryGetPawnOwner) and grab the boolean from it and print that?

#

Want to know what the Server says for that

native warren
#

I just double checked that there is no other code setting that boolean, and there isn't. Some improved find ref tools in 5.4 by the looks

native warren
thin stratus
#

Yus

uncut orbit
#

Hi! So i have a problem. I'm trying to connect to my friend (locally) and the friend is in a map called "FirstPersonMap" and it looks like its trying to connect me to the main menu of the other machine? I'm very confused so any help would be greatly appreciated. When I click the join button nothing happens and I get this in my log

[2024.05.06-20.05.26:875][983]LogGameMode: Display: Match State Changed from InProgress to LeavingMap
[2024.05.06-20.05.26:875][983]LogGameState: Match State Changed from InProgress to LeavingMap
[2024.05.06-20.05.26:875][983]LogGlobalStatus: UEngine::Browse Started Browse: "192.168.1.12/Game/FirstPerson/Maps/MainMenu"
[2024.05.06-20.05.26:875][983]LogNet: Browse: 192.168.1.12/Game/FirstPerson/Maps/MainMenu```
obtuse field
#

When can I be certain that both pawn and player state of the listen server's host player are valid?

queen escarp
#

ok i found the issue my reff i used get player controller index 0

#

this is on the player pawn what ref should i use

#

get controller +

short arrow
short arrow
queen escarp
#

im trying to get a ref to that player pawns controller

#

for each player

#

or rather so that player pawn gets its own controller

short arrow
#

get controller -> cast to playercontroller

queen escarp
#

yeah but im getting controller 0 from both server & client

short arrow
#

get controller is not get player controller at index

#

it's just get controller

queen escarp
#

yeah like this ?

#

server & clients still gets same controller :/&

short arrow
#

yeah, it's getting the controller of the pawn

#

so they would end up getting the same controller

queen escarp
#

but they have different pawns :/ ?

#

should i cast it localy then ? would that help

short arrow
#

you can plug an is locally controlled bool in

#

but it would only help debug the issue, it wouldn't really change anything

queen escarp
#

still got the same controller .O

#

yeah

short arrow
#

so all 4 prints have the exact same controller?

#

that beginplay will fire twice on the client, and twice on the server

#

2 prints should have the same controller, 1 print should have a different controller, and one more print should be empty

#

If that's not happening then something else is going on, maybe add a delay before casting to see if anything changes

queen escarp
#

hm

short arrow
#

yeah, I just got the same result as you, adding a delay before the casting node fixed the issue

#

you need to call that code somewhere else

queen escarp
#

oh

short arrow
#

possibly on possessed

#

do an RPC to client to tell the client that they've successfully possessed the pawn, and then run the code

queen escarp
#

this is what i got with a small delay

#

with server+ 1client

short arrow
#

that looks correct to me

#

the clients controller is C_0 in this case, and the servers controller is C_1 in this case

#

the reason the server has 2 prints is because the server knows about the clients controller, whearas the client doesn't know about the servers controller. If the client knew about the servers controller, then there would be 4 prints total

plush lotus
#

Little question. I have 4 local screens. So i guess all those local screens has their own "instance" Is there a way to make get game from Screen 1? to retrieve who is the gamecontroller associate to the screen? but with a more generique way?

queen escarp
#

hm mkey, so it shold be "correct"+

plush lotus
#

I build a widget where i need to find for the screen what is the controller, and for the controller what is the pawn

#

but it's possible if i can access to the screen instance automatically

short arrow
#

it is correct, you can do an is local controller check if you want to remove the second servers print

queen escarp
#

ah ok tyty

short arrow
plush lotus
#

all of them have their own HUD. So i have HUD for screen 1, HUD for screen 2, HUD for Screen 3 and HUD for screen 4.
How can i get a HUD. and check base on that hud what is the player controller?
Is there a function that return me the list of HUD, and for each HUD the player controller?

#

GetHud(1) --> GetPlayerController(0) --> getPawn
GetHud(2) --> GetPlayerController(1) --> getPawn
GetHud(x) ---> findThePlayerController ---> GetPawn

violet sentinel
plush lotus
#

So i just need to fin the PC and from there search for its HUD and Pawn

#

ok thanks

violet sentinel
#

you don't need to find it, it should be directly accessible

plush lotus
#

but you see i'm inside a widget

#

with that one i have to specify the player index

#

but i don't know the player index for that associate HUD

violet sentinel
#

that is "global" finder, you normally almost never use them. and for your complex case it is kinda poison

plush lotus
#

i need this one?

violet sentinel
#

widget has owner context, it has GetOwningPlayer and others context-valid accessors

thin stratus
#

LocalPlayer, while it sounds like it's the "local" Player based on network context, is actually a different Class called ULocalPlayer :P

#

BP peeps don't often get into contact with that.

plush lotus
#

thanks

#

it helps 🙂

opal pulsar
#

@chrome bay Where are you at on this? I did a little bit of testing and I only see properties that have been modified from the default state as being sent again every ForceNetUpdate/Flush call not all of the replicated values, were you speaking just in general or did they change something? Sorry for the ping

queen escarp
#

@short arrow another thing

#

on the client the fade in is access none on client

#

this is from a actor component on the player charcter

#

why would a client get that resault ?

fathom aspen
opal pulsar
fathom aspen
#

That's it, if you're using insights, then it should be true.

#

I don't have the engine at hand, but indeed I would have the same assumption, unless the shadow state is stored in the ActorChannel, then the plot would only thicken

opal pulsar
#

Hmm possibly, I tried 2 different ways

  • with Initial dormancy and just calling ForceNetUpdate when I change it, this had the actor channel setup and creation cost right there at the time of calling as well as the normal replication of the actor and every call after was just the normal replication cost (with the values that were only originally changed)
  • with awake to begin with and then I change the value, set it to dorm_all and then after a few seconds I call ForceNetUpdate in a loop with a few seconds delay in between, that has the channel cost only when originally connecting and even though its set to dorm_all after that when I call ForceNetUpdate it doesnt pay that channel cost again, only normal replication of the actor.

Do you know if I need to wait some time for a channel to be closed after going dormant?

fathom aspen
#

Hum, interesting. I'm almost sure it's hardcoded as 5 seconds in the engine

brisk swift
#

is this not enough to possess an actor on client, I'm able to jump and use some other inputs but not look around or move

#

the function is called in begin player passing in 'this'

opal pulsar
fathom aspen
#

A HasAuthority check in PlayerController's BeginPlay with that Possess call should be enough

#

But if you are already able to pass it input, then it means you are already possessing it, so it could be something with your input binding etc.

brisk swift
#

how do i let clients call server rpcs on widgets?

storm grove
# fathom aspen But if you are already able to pass it input, then it means you are already poss...

Hey, just reading your Tips and Tricks blog article and you mention structs replicate atomically when they override the NetSerialize function, would you see an issues with a simple dirty flag int that represents which values to deserialize on the receiving end? like a struct with 8 values could have an uint8 as its flags like 00010010 and then you can just re read that an be like oh, I only need to try deserialize values 1 and 4. Would there be an issues with this method do you think? Basically just a way to ensure the NEEDED values all arrive together without re sending wasted repeats?

storm grove
solar stirrup
#

Widgets don't replicate anyway

#

They don't exist on the server

brisk swift
#

yeah basically when clicked on a button it's effecting something on an actor

solar stirrup
#

Have the RPC be on the actor if it's an actor owned by a player

#

Else route it through the player controller

storm grove
thin stratus
#

It has to be a replicated actor though. Widgets can't do that

storm grove
#

true

fathom aspen
#

A multicast in the PlayerController is awkward. It says to REPLICATED TO ALL, but it's potentially to ALL. PlayerController doesn't really exist on all instances. It's server + owning client. For the listen server player, server and owning client is really the same instance, so the function was really just running on the server @brisk swift

#

A multicast should instead exist on an actor REALLY replicated to all, say a PlayerCharacter for example

brisk swift
#

yeah i got it working, ty for your help

surreal fox
#

Whats the difference in lobbies and session? Like both do the same job to connect player in a same ip right?

plush lotus
#

Hello

#

I have bought 3 controllers USB for testing purpose. (8$ the controller)
The controller is recognize by Windows but doesn't work into UE. Is there something to do to be able to use a random gamecontroller?

#

you can see into widows the controller works

#

is there something to do?

lost inlet
surreal fox
#

is log in is compulsory if I want to create/join session in EOS? cause iam having log error saying user not logged in

plush lotus
#

i bought them to easily test the 4 local multiplayers game mode... but if they don't work it's annoying

swift bay
#

Hey there!

I'm currently struggling to replicate a value-change of a replicated TObject and was wondering what I am missing so this works correctly.

I have an UserCommentActor that is spawned via a ServerRPC and that actor is assigned a CommentData* : UObject after spawning. (CommentData is created on Server)

The CommentData has a bunch of variables inside which are marked as UPROPERTY(Replicated), for example the ReferencedUserCommentActor*, pointing to the UserCommentActor.

That CommentData* field inside the UserCommentActor is marked as UPROPERTY(ReplicatedUsing ="..."), inside a DOREPLIFETIME macro in GetLifetimeReplicatedProps and part of
the ReplicateSubobjects method: bChanged |= Channel->ReplicateSubobject(CommentData, *Bunch, *RepFlags);

This works properly and all clients can see the correct data.

The next step causes issues: The user has the functionality to add responses to this comment, which are stored as TArray<CommentData*> inside the CommentData class. After the client
has typed in the proper information and clicks on CreateResponse in an UI, I access my PlayerController and invoke a Server_RPC.

Inside the Server_RPC I create a new CommentData* Object, access the referenced UserCommentActor inside the original CommentData and call AddCommentResponse(NewCommentData).

However, this new response is not properly replicated to all clients. I am seeing this new response on the client who created it.

So I kind of was wondering if I am having the correct approach to create these responses and something is missing with the TArray replication or this approach is just incorrect.

Grateful for any advice!

lost inlet
buoyant wedge
#

@violet sentinel @sinful tree i found the problem. I can't test steam session on editor appareantly, are working in build with 2 pc and different steam account

normal viper
#

What do I have to check to see ''running'' and overall all animations of each characters in multiplayer? Right now I can only see animations of running on one of clients. The idle animations are working correctly though.

thin stratus
#

The default ThirdPerson Template should have an example for this fwiw.

magic vessel
#

Why isn't my fast array serialiser updating newly joining clients? Is that expected behaviour or what details should I add?

#
UPROPERTY(BlueprintGetter = GetCustomArray, Replicated, VisibleAnywhere, Category = "Custom")
    FCustomArray CustomArray;
#
    if(Index != INDEX_NONE)
    {
        UE_LOG(LogCustomArray, Warning, TEXT("FCustomArray::Append() - Index: %d"), Index);
        CustomArray[Index].Index = Index;
        MarkItemDirty(CustomArray[Index]);
        OwningComponent.Get()->Add(CustomArray[Index]);
    }
}
worthy oak
#

Game stats is for rule related events that need to be tracked and synced. Such as how long the game has been running, players in the game, could be points each team has ext

#

Game mode is server only and is for the rules of your game. Like how many players are needed to play. Where is everyone spawning. Are there teams? Ext

ashen plume
#

anybody know how i can replicate a variable in a Uobject that is in my player character?

worthy oak
#

Yes. Though you will probably want to override and implement your own functionality

twin juniper
#

What's an effective/efficient way of broadcasting player movement inputs (such as Last Input Vector from the default Movement Component)? I have vehicles I need to animate reactions to inputs before any movement actually occurs. Using the Lyra frontend. Looking to improve the current hacky solution shown.

weak linden
#

Hey, is anyone off the top of their head aware whether bShouldAdvertise in online session settings can be changed mid-session in Steam OSS? Or is that a creation time setting? I'm aware of other options that can be updated but I'm not sure for advertising the session altogether, thanks in advance!

vapid fog
#

Is there a recommended solution for having a single server with players in different levels? (I.E. totally unable to see each other, etc.)

#

I've been experimenting with having them all load in a world partition level separated by some distance. And trying to work out the mechanics of only having a client load a single level and not the other areas.

weak linden
# vapid fog Is there a recommended solution for having a single server with players in diffe...

In a dedicated server scenario you can likely use level streaming and load the level just for the server and that client, but that wouldn't work too well in a listen server, since the host would need to have all the levels loaded too (as in every single "separate level") so the player/s actually in that level can actually walk on anything, etc (unless you were to use client authoritative movement)

vapid fog
#

Level streaming seems to be obsolete and has been replaced by world partition. So my solution with world partition should work. Just curious what the standard is.

weak linden
#

That I can't directly answer, but with what knowledge I do have, there likely isn't a massively straight forward solution given Unreal is typically server authoritative and the server/hosting player is expected to have geometry loaded if a client is to be able to traverse it

vapid fog
#

Loaded != visible.

weak linden
#

Of course, that's not what I'm confusing here, I realize you could hide that/everything in that level, the point I'm making is it's not "straight forward" to do what you're asking 🙂

sinful tree
#

https://www.unrealengine.com/marketplace/en-US/product/multiworld
This asset here, has the feature of being able to have multiple worlds running, and can be used in multiplayer, but the extra worlds are not replicated - so the client can still stay connected, but they're basically running the extra worlds on their own computer (which isn't what you want).

vapid fog
#

Without knowing much about the older level streaming method, it seems like the way to go would be to load the separate levels some distance apart in the world partitioned world, and use some combo of data layers and masks to prevent users in one level from seeing users in another level.

#

This raises a lot of technical questions, but first and foremost is - do the clients have access to information about the other loaded levels even though they cannot see it? Etc.

#

@sinful tree looks like in Multiworld all those worlds run on the server correct? That seems fine.

sinful tree
chrome quest
#

The real question is why you want this feature😅

#

Server costs?

vapid fog
#

The feature I want is for players to be able to warp between different self-contained areas. Such a thing can be achieved simply through world partition, but the one troublesome spot is that unless you place each area further than the render distance, clients could see one area from another, which I don't want.

sinful tree
#

Here's a good example I can think of...
Let's say you had a town that had a building that multiple players could "enter" to then access their "home" which they customize to their liking.

#

If you had multiple players going to the home, you'd need some way of properly instantiating those interiors.

vapid fog
#

An example is easy. You have different worlds that you can travel between via portals. These worlds are relatively small.

chrome quest
vapid fog
#

Yeah, I think the straight forward solution is to do that. Ideally the server would only serve information about the world you're on and not the other worlds to save bandwidth and what have you.

#

The other solution would be to spin up a new dedicated server for every world generated and handoff the clients between them as you go.

chrome quest
#

Yep. I think you can also do something with relevancy and the replication graph, but that's going a bit far

chrome quest
#

Need a master server to handle the data transfer. Or could make the servers talk to each other. That's another networking hurdle to deal with

vapid fog
#

One server to list servers and their connections and pass off data. Yeah, I mean, nothing there is trivial.

weak linden
#

Another option is to just allow client auth movement whilst they're in "their" world instance, of course this only works if you don't ever want other players in those instances too, this way you only have to locally load that level

vapid fog
#

Nothing wrong with Client authoritative, but this causes a lot of its own problems that are more complicated than the other solutions.

chrome quest
#

I think the visibility stuff is the quickest. I'd use some kind of bounding box when the player enters, turn on visibility, when he leaves, turn it off

#

Ez pz

#

Maybe use a replicated state instead of RPCs to handle late connections and disconnects.

weak linden
# chrome quest Ez pz

Every solution here is fighting what the engine is designed to do, so the ease is relative to "extremely hard/awkward" 😅

karmic gust
#

Is there a specific cause that a local player triggering an interaction from a connected client wouldn't give a true value for IsLocallyControlled? Notable features, this is already a mutliplayer project, the character is running around and I'm triggering an event from an interaction, but it only works properly on the server, though the signal is making it all the way to the client too, but this one part is not true on the client.

vapid fog
#

one solution is their bog standard world partition system, but with limited visibility. This doesn't seem like its working against what the engine is deinsed to do.

chrome quest
#

I mean, the engine isn't designed not to do what they want to do. It's just choosing the implementation

vapid fog
#

Nor would spinning a sever up for each world and allowing the player to move between them. That's not built into the engine, but certainly isn't anti-unreal way.

#

but multiple worlds on a single server, yes.

sinful tree
karmic gust
#

But If I'm specifically the connected client and perform the interaction then check that I'm locally controlled, that seems to be returning false, which is what's confusing me

sinful tree
karmic gust
#

I mean I think so I'm running it locally with direct player interaction before sending the signal to the server, which is what this snippet is (before sending the signal to the server), maybe it's the interface then, I hadn't implemented it, but it's running off base input 'f' key off the local player and passing itself as a ref as the interactor

sinful tree
#

So the flow is:
Player Input on Pawn > Call Interact Interface passing reference to "Self" for the pawn to another actor?

karmic gust
#

My little debug

Correct

#

Oh my, I reversed the trace, the interact is actually sending the signal to the server if it doesn't have auth, this is the root of my problem I'm assuming

sinful tree
#

Yes, the pawn wouldn't be locally controlled by the server if it's locally controlled by a client.

karmic gust
#

I hadn't expected base controls to run their signals to the server, so I hadn't checked the projects set up of the base classes initially. Thanks for your help

#

Or at least I assume that's what this is doing

#

Though, this is still supposedly firing locally too, so not sure why it still doesn't trigger

dark parcel
sinful tree
#

What your code says:
I've pressed an input for Interaction.
Check if I have authority of this particular actor (clients usually do not if it's a replicated actor spawned by server, and all the rest here is assuming it's a replicated actor spawned by the server)
If I do not have authority, ask the server to continue to execute "Server Interact" --- From this point on it's the server executing the rest of the code.
If I do have authority, call "Interact" --- The server initiated the input so the server would still continue executing the rest of the code.
As you're running on the server, the server will determine whether or not the pawn is being "Locally Controlled". "Locally Controlled" literally means if the player controller controlling a pawn is controlled by this computer running this code. If the pawn is controlled by the host's playercontroller, then the pawn is locally controlled and return true. If the pawn is controlled by a client's playercontroller then the pawn is not locally controlled, and return false.

You can test this on the pawn itself. Put a print string on your input and print out "IsLocallyControlled". Put another print string on your "Server_Interact" event and again, print "IsLocallyControlled".

#

Then you can press your inputs on either the server or the client, and you should see "True False" for the client but "True True" for the server.

karmic gust
#

interestingly this is the input I'm seeing it's never true true at the server_interact, or at the input trigger itself.

sinful tree
#

Again, if this is a client owned pawn, it wouldn't be locally controlled on the server.
If it's the server's (host's) pawn, then it would be locally controlled on the server.

karmic gust
#

Right now I have it so that the player interacts, triggers the event, and then the server replicates it by a server call, does it make more sense that I just lean into the existing framework that's here and have it so that the server just tells the clients that's what's happening instead? That's what is making sense to me in this case.

sinful tree
#

Right now you're having the client call to the server to perform the interaction entirely. Nothing is happening client side at all other than their input press.

karmic gust
#

Yeah, I suppose that is the issue I'm seeing, I think I've got it now, the server interaction is what initially was throwing me off, and I have been wondering how to salvage what I've got set up

brisk swift
#

I need the clients game instance in playercontroller on begin player but Begin Play is a server ran function right? How do I get the clients game instance from there

chrome quest
karmic gust
#

@sinful tree Thanks for your help, I was able to get it working properly now that I understood the server's role in the input system I had.

brisk swift
#

dm now got it to work

glad robin
#

So I have a user widget with friends list displayed and invite/joins. How should I go about updating this to change when a user logs in/out. Currently I just re-read and populate the list on a set interval, is there a better way to handle this? I couldn't seem to find anything in the friends interface.

sinful tree
glad robin
native warren
# thin stratus Can you, inside the AnimBP EventGraph, get the Character (TryGetPawnOwner) and g...

just to follow up on this, the failure of the client animation on the listen-server came down to some additional death logic where I was (stupidly) detaching the owning client's controller in lieu of disabling input - that must have been doing something like changing the network role of the autonomous proxy so that the rep notify was going into the ether. You're line of questioning led me to discover that, so thank you and those others that contributed.

devout sonnet
#

Multiplayer is so discouraging. I can't even figure out how to fill the names in the "lobby".

zealous knoll
#

Interfaces can be replicated? I am about to refactor my blueprints to not have so much "Cast to.." nodes but I am in doubt if Interfaces are limited on network replication

fathom aspen
#

Interfaces can't have state, so there is no point in "replicating" them, and also it makes no sense, so no they can't be replicated.

#

You can do that just fine, but first read Eren's pin in #blueprint

fathom aspen
zealous knoll
modest crater
#

Is replication graph different to iris, as in are the mutually exclusive?

My project is reaching a crossroad where I think I need to look into my options before I start building up my replication code and refining it.

I am about to start looking into replication options and if my project even requires something more custom than the default provided systems. I understand that iris is the new kid on the block but I am not sure if it completely replaces the replication graph or not. I also know very minor details of each system.

thin stratus
#

@hollow gate Quick note about the PrimaryVisualComponent.
It might be worth allowing a USceneComponent and adding an Interface option so people can specify the Component via a getter.

We don't use a single MeshComp on our end for example.

thin stratus
#

@hollow gate There also seem to be a few logs that specify e.g. NetSerialize while you log them in the Simulated version. probably some more things. mostly just skimming through

#
void UMoverComponent::FinalizeSmoothingFrame(const FMoverSyncState* SyncState, const FMoverAuxStateContext* AuxState)
{
    const FMoverDefaultSyncState* MoverState = SyncState->SyncStateCollection.FindDataByType<FMoverDefaultSyncState>();
    USkeletalMeshComponent* MeshComponent = GetOwner()->GetComponentByClass<USkeletalMeshComponent>();
    if(MoverState && MeshComponent)
    {
        FTransform ActorTransform = FTransform(MoverState->GetOrientation_WorldSpace(),MoverState->GetLocation_WorldSpace(),FVector::OneVector);
        MeshComponent->SetWorldTransform(BaseVisualComponentTransform * ActorTransform);
    }
}
#

Shouldn't this use the PrimaryVisualComponent?

#

Instead of grabbing a SkeketalMeshComponent?

hollow gate
modest crater
thin stratus
#

No experience. Don't know many people that use it yet.

hollow gate
hollow gate
thin stratus
#
void FMoverDataCollection::NetSerializeSimulatedDataArray(FArchive& Ar, TArray<TSharedPtr<FMoverDataStructBase>>& DataArray)
{
  /// [...]

  UE_LOG(LogMover, Error, TEXT("FMoverDataCollection::NetSerialize: ScriptStruct not derived from FMoverDataStructBase attempted to serialize."));
}
hollow gate
#

net serialize function are on the "user" side. mover implements them. they are not part of NPP per se.

thin stratus
#

TEXT("FMoverDataCollection::NetSerialize

hollow gate
#

you can clearly see, it's mostly copy paste 😅

thin stratus
#

Yeah no worries. I'm just looking through it at the moment, cause my SmoothingComponent solution seems jittery. Not sure why atm.

hollow gate
#

i tried to keep epic code as it is as much as possible

#

higher chance PR would get accepted or at least used

thin stratus
#

Makes sense

queen escarp
#

hm hey

hollow gate
#

and simulated proxies set the montage time in normal finalize

queen escarp
#

im using this to spawn floating text for players

thin stratus
#

For a FirstPerson View, why would even Smooth the Rotation of a FirstPersonBody Mesh?

#

Shouldn't that just follow ControlRotationYaw?

queen escarp
#

it works but its fiering twice for the clients serverside & client side

#

how can i make it only fire on client

hollow gate
#

if mover is controlling the rotation , which it is. you need to smooth it

queen escarp
#

and also if i switch to is remote then it wont spawn on host (listen server)

thin stratus
#

But we aren't smoothing the Camera either

#

Rotation-wise that is

#

It just uses the current ControlRotation

hollow gate
#

we are only smoothing the camera global rotation , which is parented to some scene component. if that scene component rotation is jittery final camera transform is jittery too. jittery transform + stable camera rotation = jittery camera transform. but jsmoothing the parent transform doesn't make the rotation of the camera jittery. camera rotation is not set by mover

thin stratus
#

@hollow gate But why would I smooth the ControlRotation? Like, we take the ControlRotation every SimFrame and send it to the Server.
In between the SimFrames, we are now Smoothing from Last ControlRotation to new one. That introduces sluggish feeling for Camera and thus Aim.
We have the actual ControlRotation values of the Player in between the SimTicks, so why not just use them instead of Smoothing them?
And I don't mean corrections.

hollow gate
thin stratus
#

To be more precise, we smooth the SceneComponents that otherwise use ControlRotation

hollow gate
thin stratus
#

We are using ControlRotation for the Camera though?

#

And with that for the FirstPersonArms/Body.

hollow gate
#

for camera yes, mover only touches the scene. camera rotation does not care for its parent. it always follow control rotation

thin stratus
#

Sure okay, but why would I not do the same with FirstPersonMeshes?

#

I assume I would?

#

I can't parent the BODY Mesh to the Camera fwiw

#
  • NetworkSmoothedSceneComp
    • CameraComponent
      • FirstPersonArms
    • FirstPersonBody
#

Guess that's wrong then

hollow gate
#

but the camera location is based one the parent, so it will be jittery

thin stratus
#

The thing is, the location smoothing that I can see seems fine

#

It's the rotation that is not working fwiw

hollow gate
#

it should be the exact same thing for first or third..

#

camera is attached to some scene component

#

that is smoothed

thin stratus
#

Yes

#

Location-Only

#
  • NetworkSmoothedSceneComp (Loc + Rot)
    • CameraComponent (Loc) (ControlRot)
      • FirstPersonArms (Loc) (ControlRot)
    • SomeOtherMesh (Loc + Rot)
hollow gate
#

you can try it, just don't use the smoothed rotation. as for the NPP inplementation , you can just not use the rotation in get and apply delta functions of sync state

hollow gate
#

did you try setting camera world rotation after smoothing?

#

get its rotation pre applying smoothing, then set it back to that post smoothing.

thin stratus
#

Maybe I'm not clear, so let me rephrase:

I have a NetworkSmoothedSceneComp that the SmoothingComponent (and later NPPs Smoothing) smooths the Location and Rotation of.
I have a CameraComponent attached to that, which uses ControlRotation. That means Location is Smoothed, Rotation is current RenderFrame one.
I have a FirstPersonArms Mesh attached to the Camera, so it follows the same Transform as the Camera.

The Location Smoothing and the ControlRotation feel smooth and are working.

Now I parented some other MeshComponent (a cube for now) to the NetworkSmoothedSceneComp, which doesn't use ControlRotation, so here both Location and Rotation are smoothed.
This Component looks really jittery when I rotate on the spot.

hollow gate
#

so this other mesh , from your camera perspective looks jittery? can i see a gif or something?

thin stratus
#

I can't share a gif cause NDA

#

And yes, it looks jittery

#

I basically spin in place

#

I can DM you some log numbers, maybe you can make sense of them

storm grove
#

How accurate would you say GetBaseAimRotation is? I am looking at jambaxs better burst combos article and the only thing I am a little worried about is the direction for impact particles or blood splatter effects?

#

think of a group of AI close together coming toward you, the delay could cause the wrong enemy to be the impact point for the linetrace/bloodsplat as a proxy

modest crater
#

Really depends on how much you care about accuracy, you could just pack the impact location and send it as unreliable. It really is a case by case basis and how much your game relies on accuracy of information

opal pulsar
#

can someone explain UPackageMap the comments say it has something to do with mapping objects across game instances/servers.
I ask because I want to know when I need it + when I can use the WithNetSharedSerialization like so

    enum
    {
        WithNetSerializer = true,
        WithNetSharedSerialization = true,
    };
tardy fossil
#

my understanding is WithNetSharedSerialization needs to be false if you're serializing pointers.. like a pointer to a data asset or spawned actor

#

might be more to it tho

queen escarp
#

Hello, this is how im displaying floating damage for each player it works as insteded except on the client side it fires twice one on client & server whats a good fix for that ?
using switch on authority and going remote only ruins the host side so the host dosent se it ?

#

also Skeletal Mesh Assets dosent replicate :/?

solar stirrup
#

skeletal mesh component doesn't

#

you can replicate a skeletal mesh asset reference though

queen escarp
#

hmmm bleh

#

so if i replicate the reference i can change it on server only ?

lone pumice
#

I hate replication! so, heres my problem. how do we display the widget/material created by the server to each client?

visual mountain
#

@lone pumice you would have to pass the information to an actor or component owned by the client. From Game mode you can pass a custom event to the clients pawn which can then open the widget for that player. The Player State as I understand is also valid for passing this kind of information.

violet sentinel
lone pumice
#

I'm having issue with this "Get Render Target" node. when I set my Texture Parameter value into something premade, it works fine. but when I use this node. It does not show anything. been driving me nuts for days now. basically whay I'm doing is, I want to take the render target of the widget and display it into a material. on the server it works fine. does it have something to do with the "Get Render Target" node?

visual mountain
#

if someone has something visual on how blueprint would be used to display ownership, and the use there of for client interaction with in game objects it would be greatly appreciated.

dark edge
half iris
#

For anyone that has done multiplayer proximity voice chat using the VOIP component in BP, have you ever run into the issue where the server can hear all clients attenuated (proximity voice), but the clients can not?

I am doing the full setup on both client and server, for each player, and only once all players have finished connecting to the server.

I have tried about 10 different setups and ways of initilization and am simply thinking that I must be missing a certain piece of knowledge or a node that the engine has that I am not aware of. Days of searching online has not provided any solutions to this problem.

runic hazel
#

Does anyone know how to scale buttons based on number of local players? I'm making a splitscreen game and the UI needs smaller buttons if there are 2 or even 3 players (it's vertically split)

noble sentinel
#

Can anybody help me fix this? Im using a blueprint to shift my walls but walls are shifting differently for host and client.

#

both object itself, scene root and wall mesh is replicated

#

and this is the code Im using

noble sentinel
# noble sentinel

Getting values in server and promote them to variable and using it in multicast fixed it, I forgot multicast values dont replicate...

tender solstice
#

Hi all, help please, stuck on a problem, I have a single main menu map where I set whether I am the owner of a room, I pass in the game instance the value of owner, then go to the server and the server always considers my variable whether I am the owner false, pls help guys

soft flare
#

Yo guys i need some help, i am trying to get my game into multiplayer and my combat works this way that every animation where there is like a sword attack triggers the hitbox on an montage notify. i use the "play montage" node. now here is the problem. i need to multicast the animation but i need the info of the notify on the server (since the hitbox is playing only on the server). Going from multicast to server makes it probably fire off on the server multiple times wich is really bad. any ideas?

#

Or such things as "increase a server number when completed" i cant do it cause of the multicast. i have tried to play a animation seperatly on the multicast and play the animation only on the server. but that caused the problem for example that the multicasted animation cancels the server animation wich leads to me not reaching the notifyer

surreal fox
#

Can't we use level stream in multiplayer?

#

aur when I open a map after creating a session using server travel, it crashed

torpid whale
#

Hi, one question, im using Simple Move To Location, the movement looks good in all the clients and server, but looks weird in the self client, why is that? Thanks

maiden flame
#

Unless you're talking about the hitbox triggering on tick, causing something to be called multiple times. That can be solved with flow control, and you don't need to invoke any events more than once per hit.

soft flare
#

Ahh okay thanks 🙂

twin juniper
#

What's an effective/efficient way of broadcasting player movement inputs (such as Last Input Vector from the default Movement Component)? I have vehicles I need to animate reactions to inputs before any movement actually occurs. Using the Lyra frontend. Looking to improve the current hacky solution shown.

dark edge
#

Looks fine to me, it can probably be a replicated variable though

#

with SkipOwner condition

twin juniper
#

Thanks, that's something. I've been trying to get away from Event Tick.

dark edge
#

Something somewhere is going to be ticking to send that vairable to the server as fast as possible

#

is last input vector sent to server in CMC?

twin juniper
#

No, which is the frustrating part. This will be alright though.

dark edge
#

So why is this vehicle using cmc anyway? What's going on here lol

twin juniper
#

It's adapted from Lyra and uses the LyraCharacter Pawn. Ends up working pretty well.

dark edge
#

Why is it not just using the character movement state like a regular character does? Movement is predicted for characters so there should be no lag

#

What actual end result are you after?

twin juniper
#

Actual movement works just fine - the throttle is for animation purposes only, since it's a flying drone whose thrusters move around independent of the actual pawn movement.

dark edge
#

Why not just derive acceleration and use that?

twin juniper
#

Because the thrusters need to be able to move around even if the drone is stationary.

dark edge
#

OK so you need to sell "trying to move but literally can't"

#

bascially the drone version of running into a wall

#

I could swear there's something about the "want to move" state that is handled by CMC

ashen plume
#

is there any bp workaround for replicating UObjects?
any posts i've seen are c++ only and very old
i created states for my player character from an abstract UObject base class, and would like to sync this to players joining in progress

kindred widget
maiden flame
#

Otherwise I don't see anything wrong, but you could consider using a RepNotify with SkipOwner instead of a multicast, if you need to locally predict the throttle. Maybe it works fine as it is?

normal viper
#

Did I get this right that I have to actually Multicast running animation for example after issuing command Move To?
Context:
1.I have unit selected, I right click on the ground location. I sent by server Unit Move Command which is AI Move To.
2. The problem is that I can see running animation only on server.
3. Now after long thinking I realized (not sure if right), that I have to actually Multicast the running animation itself after Issuing command? So that would be like here:

#

and this is from PlayerController

dark edge
normal viper
dark edge
#

Look at the template projects

#

most specifically, the blend space used by the 3rd person character

#

you just feed movement variables in to it, and a blend between idle or movement animations comes out

normal viper
#

Do I have to set it so it replicates or something like that?

dark edge
#

no

#

nothing about this should involve networking

#

the fact that the thing is moving is enough

#

if it is moving through the world on server and client, that's enough. The animation can be driven by that

normal viper
#

and it will be driven by each client itself ?

dark edge
#

The server doesn't need to say "It's moving, and also, it's playing a moving animation"

#

just saying "It's moving" is enough

normal viper
#

Got it. Not sure how to implement that 😄

dark edge
#

Right now do you have the actual movement synced up?

#

not the animation, the fact that the thing is moving through the world

normal viper
#

I mean I can see them moving on both sides

dark edge
#

ok so that's enough

normal viper
#

but only server is seeing ALL animations

dark edge
#

locally, on each side, your anim BP would look at variables and blend between animations

#

look at the 3rd person template project

normal viper
#

just like Manny anim BP?

#

Ok I will do some research, just one more thing. This will apply only for the movement animation right? If I want to do like Play Montage, I have to multicast this thing?

#

the Play Montage would be for example for Attack

grizzled plank
#

hi i also have a question if you are free 😄

#

which probably means that when i multicast, it doesn't work and i dont know why

dark edge
#

Or multicast "I'm doing my attack now" or whatever

#

you'll have to multicast something

#

or replicate it

grizzled plank
#

that's the code

#

on the object

#

and this is on the player

dark edge
grizzled plank
#

so how do i get rotation of the player at a distance?

dark edge
#

Also don't use reliable rpcs on tick

grizzled plank
#

ok, sorry im new to multiplayer (today years old)

dark edge
#

reliable is for stuff that absolutely HAS to happen, unreliable is for not as important stuff or things that are time sensitive and will be overwritten soon anyway

#

So what you're trying to do is networked gravity gun or grabbing physics objects right?

grizzled plank
#

yea

dark edge
#

pitch is a thing right? This isn't like a top down

grizzled plank
#

its third person

#

so, if i got this correct, if i use the camera to get what im trying, it takes each client's camera and get the z position from there?

#

except for the server and the player

dark edge
#

however, ControlRotation, which presumably is what you're using to drive the orientation of that camera, is not fully replicated

#

print the camera rotation on tick and see the difference between the owning client and everyone else

grizzled plank
#

i did

#

its fine on x and y

#

but z is different only for clients

#

server gets everything corretly, and the playing client as well

grizzled plank
#

ok so only the pitch is not registering on the client

#

i played as the first line "client 0"

#

when i play on server, it doesn't register on all clients

dark edge
#

take a look at that

#

that should be a replicated pitch for you

grizzled plank
#

i'll try, btw i also have pitch rotato on the anim blueprint and it's replication is set to none.

#

can that be the problem?

sinful tree
#

Anim blueprints don't need to replicate. They should be reading from the actors that would be replicating.

grizzled plank
grizzled plank
#

ty 🙂

#

but 1 more question, i use it only for rotation. i still get world location from follow camera, is it okay?

dark edge
#

Does the camera actually move relative to the the character? Or does it just rotate around?

normal viper
#

Hmm, so actually I tried 1 more thing and I launched game as 4 players, and all 3 players can see their own and others animations but not the server. Is this normal?

twin juniper
dark edge
grizzled plank
#

3rd person

dark edge
# grizzled plank 3rd person

Just have the carry position based on control rotation + some distance from capsule, I wouldn't base it off the camera location

chrome dawn
#

@dark edge Does this match the code you told me to put because it didn't fix the problem, I'm still having the same issue

dark edge
#

gameinstance doesn't replicate

chrome dawn
#

must have been carry over from one of my other tries at fixing it one sec

foggy shoal
#

Do you guys think online coop games like hell divers or deep rock galatic, etc use a server authority model? Or do you think that since it is coop game, they use client authority for simplicity?

fossil spoke
#

Its not something you just toggle between globally.

#

Replication and the Network is ALWAYS Server Authoritative (because only the Server can make remote changes to Clients, other Clients cant make changes to other Clients on their own).

#

A Client telling the Server, "I moved here, trust me" is Client Authoritative.

#

A Client telling the Server, "I moved here, verify me" and the Server responding with a correction after doing the verification, is Server Authoritative.

foggy shoal
#

All true. THis question kind of comes from that fact that i recently learned Lyra is client authority when it comes to hit detection and player movement(dash). Made me wonder if professional games went all out on server authroity or if they were more Lyra

fossil spoke
#

Its one of those things where you as the developer make the decision that you can get away with Client Authoritative on a per feature basis.

#

Hit Detection being Client Authoritative is just simply trusting that when the Client tells the Server that it shot some enemy. The Server blindly accepts it and deals damage to it.

#

Server Auth of that would be something like the Server verifying that the Client could infact perform that shot, before applying damage.

foggy shoal
fossil spoke
#

Of course they do, but its a tradeoff.

#

They might not do it specifically for those features you mentioned.

foggy shoal
#

yeah that makes sense

fossil spoke
#

But its not unusual to trust the Client in certain circumstances.

#

Its a measure of how far you are willing to trust them and with what.

#

Mostly it comes down to how it affects the play experience for others.

foggy shoal
#

I think i ahve been kind of stressing that a trace hit HAS to be server authoritiative, because of cheating, etc. But then i saw lyra didnt do it, and i thought, for a coop game, maybe it isnt as important as i thought

fossil spoke
#

Server verification of hits is more about tolerances than 1:1 validity.

#

Was what the Client reported to the Server, close enough that we can consider it a legitimate hit.

#

If it deviates to far, it was either a result of to high ping, or outright cheating.

#

Some simple verification steps are not unusual to get close enough to remove most edge cases with "trusting the client".

#

Especially in Coop games.

#

If you were building a competitive esport FPS (which IMO no body should be doing anymore, its far to saturated and difficult, technically and successfully), then you have an entirely different story on your hands.

foggy shoal
#

totally agree there.

#

Thanks for your input on this, much appreciated 🙂

fossil spoke
#

👍

#

Performance is also a major consideration if that didnt cross your mind.

#

Which maybe something that causes you to favor Client Auth

foggy shoal
#

you mean if you ask the server to validate to much?

fossil spoke
#

Yes

foggy shoal
#

yeah that makes sense. Honestly havent thought that far ahead

fossil spoke
#

There is a somewhat popular Scifi FPS game people still play that supports hundreds of Players per server

#

I forget its name.

#

But the main reason it can do that is because its movement is entirely Client Auth

foggy shoal
#

interesting...

fossil spoke
#

PlanetSide2?

#

I think is its name

foggy shoal
#

ah yeah, that game fits

fossil spoke
#

They conciously decided to do that, to be able to handle that number of players.

foggy shoal
#

Mind if i ask what you would do, say if you were building a coop shooter. Would you trust the client on hit detection and player movement?

fossil spoke
#

Thats a difficult question to answer without understanding the entire context of other features of the game.

#

How many Players?

#

How much AI?

#

Does it have tradeables?

#

Does it have purchaseables?

#

Lots of questions

#

That may not exactly have anything directly to do with an individual feature being Client Auth or not

#

But can have major impacts none the less.

#

Especially when talking about Hit Detection/Verification and/or Player Movement.

#

I would say though, that you can be less concerned about it in a Coop game.

#

Especially from an intentional cheating perspective.

#

The impact of cheating is less so in a Coop environment.

#

The incidence of cheating is going to be less as well, since the "competition" isnt so much about being pitted against other Players.

foggy shoal
#

that's what i was thinking as well. Appreciate your opinion though! Sometimes its nice to talk through things, so thanks for your opinion and time on this

fossil spoke
#

No problem.

errant mulch
#

hello guys! i was hoping you could help me make sense of something.

in the picture i have two sets of code to obtain de direction which the player is moving, the one disconnected at the bottom (which dosent work as i need it) and the one connected at the top, wich all it does is getting the corresponding inputAxis from the default movement blueprint. Dont worry to much about what comes after the booleans, all there is a system which activates one niagara particle or the other depending on the direction

my problem here is that if i use the disconnected system, the particles replicate just fine, but if i use the one that gets the input axis, the particles dont appear on the other client at all.

what could be the problem here?

#

oh, and before i forget, even if i set the variables to replicate, it dosent work either

fossil spoke
#

Inputs are local only, unless you tell the Server to replicate them (from the Client producing them), they wont have any impact on others.

errant mulch
#

let me guess then

#

rpc?

fossil spoke
#

The Velocity of the CMC is replicated.

#

Thats why it works.

errant mulch
#

i see

fossil spoke
#

You should be using Velocity anyway.

#

In a network context.

errant mulch
fossil spoke
#

Right, so what do you want?

errant mulch
#

just the direction which the player is moving

#

like the input axis forward/right

fossil spoke
#

That is what Velocity tells you.

#

Inputs are "where I want to move locally".

#

Velocity is "where I am moving right now".

errant mulch
#

does it? i mean, when i face one way or the other in the world, the velocity changes, for example, if im facing the Y axis, my movement is 300 in Y, 0 in X and that gives me errors when i try to spawn the particles

#

was it something about getting the lengt of the vector?

fossil spoke
#

What are you trying to achieve exactly?

errant mulch
#

welp, guess ill be more specific, i just dont wanted to put more stuff in the question to avoid confusion, but it seems that im doing the opposite D:

#

you know valorant?

fossil spoke
#

Being specific is better than being vague most of the time.

fossil spoke
errant mulch
#

welp, there is a character that impulses herself with a gust of wind in a direction, and (i do belive, using a widget) particles appear on a direction depending on which way she propeled herself

#

if you notice the lines that appear on the screen, they will go backwards if the character goes forward

fossil spoke
#

That would just be decided by the Characters rotation.

errant mulch
#

how does the rotation gives me the direction in which the lines would move?

fossil spoke
#

Because rotation is a direction?

#

Reverse the rotation and you have the backwards direction of the Character

errant mulch
#

so if my character is moving to the left but facing forward, the rotation can give me that data?

fossil spoke
#

Ok in that case you want Velocity then?

errant mulch
#

sorry if i sound totally lost, but it seems counter intuitive to me even tho it must be logical

fossil spoke
#

Reverse the Velocity and you have the opposite of the direction they are moving?

errant mulch
#

i see

fossil spoke
#

Its just a Dash ability right?

#

You must have some value that tells the Character which direction to Dash?

#

That value becomes what you need to do the visuals.

#

The reverse of the Dash direction is the direction the visuals need to be facing?

errant mulch
fossil spoke
#

So whats the problem?

errant mulch
#

let me try to take a picture of it better

dark edge
#

While we're on this, is there anything already replicated in CMC that pertains to input or attempted moves or anything like that?
Like, for if you wanted to sell "Trying to move but can't"

fossil spoke
#

They dont know anything about much else lol

#

They certainly dont know what inputs were passed to the server

#

Its unnecessary information 99% of the time.

errant mulch
#

sorry, light went off and then i decided to try to fight the bug for myself for a little more until i fixed, which i finally did, this is what i changed to get the "local velocity" of the player

knotty briar
#

Hello everyone

#

I just need a bit of help

#

I have an interaction system for my tiles and tower defense game which is multiplayer and PVP

#

the way it works is that a widget calls an event in the owning player, since widgets are client based anyway. That player passes info into an server event which is passed into a multicast event which spawns an actor on each client and gives it a component. That part seems to work fine

#

the issue is when Im trying to destroy it

#

I want to sell towers so I have been doing it the same way, using the component inside the actor, it pulls the data for how to set the instances for the map back to how it was. That works fine on the multicast but when I try destroying it I can only destroy it on the server. It has the accessed none error which I find interesting because I gave the information to the client telling it to delete a specifc object.

#

Ive got screenshots

#

so it doesnt delete the actor I want it to delete

#

first one is to buy

#

second one is for selling

#

Im doing it through an RPC, rather than through the server spawning and deleting it because I want the object data to be on the client, so that the client can interact with it

#

the widgets can call them all fine and the update instance works fine

#

its just the destroying of the actor thats a bit annoying

#

wait a second maybe the reason it returns none is because that reference was never on the client

#

each client spawns their own actor

#

nope

#

not working

neon summit
#

is target 2 selected tile?

#

cant tell

knotty briar
#

target one is the instance, target two is the actor I want to delete

#

when the player clicks on it it stores the reference to the selected tile

#

and when I press the sell button it should destroy it

#

by calling this script

knotty briar
knotty briar
#

Been trying to sort it out for 2 days now but honestly I dont really know what to do from this point on, because the thing is, if I make it on the server but set it to replicates

#

wait

#

actually

#

got an idea

#

no nvm

#

I dont think it will work

#

because when I make it on the server the interaction system stops working

#

I want each client to have their own copy of it because I want them to be able to see different versions of it

#

so when the player interacts, it creates a white outline but only the client who is interacting should be able to see it

#

which works fine

#

however if I do the selection on the server and make it and remove it on the server, that actor is not going to be client based

#

meaning I cant let the client see a different version

#

if that makes sense I guess

knotty briar
#

OKAY

#

SO

#

I figured half of it out

#

💀

#

the other half im still working on

#

the interaction system I made was made in a way expecting the client to be able to remove the actors themselve

#

but they dont have the authority to do that right

#

so the server has to

#

the clients cant pull some information if the server makes the actor, so I am having to add in certain events into the code to allow for the owning clients to gather information to select and destroy tiles

lament flax
#

weird question :
when a client connects after a while (the level is loaded for all previous clients and server), will begin play trigger for the client on the already loaded actors placed in the level ?

ancient adder
#

Yep

grim prism
#

Hello, i am trying to add multiplayer to my game, however the client player seems to be stuffing up when compared to the server player, for example. Instead of scaling to be 10 times bigger, its much more. Another being, when i press the sprint input, it doesn't sprint.

Any help? 👍

ancient adder
#

You could try AActor::GetUniqueID, Not sure if it's synced between client and server tho

#

Returns the unique ID of the object...these are reused so it is only unique while the object is alive

woven basin
#

many parts of multiplayer are simply not available in BP - that's why c++ tends to be needed for multiplayer for some of the lower level parts when you need extra control

worthy oak
knotty briar
ancient adder
worthy oak
#

Indeed yep

woven basin
#

yes, but if a client joins late, the server wont fire begin play on the existing actors, just any new ones. The new client fires begin play on all actors

#

just to clarify that part

violet sentinel
#

you can use names (if they're stable) or pointers to actors (they're locally unique) as identifiers

you can have a struct that would have a pair of identifiers , then you got two options:

  1. have a map pair type to float.
  2. array of structs with 2 identifiers + variables you want to associate with pair. with functions to find element based on input actors

for bp-only i'd say option 2

worthy oak
lament flax
#

thanks for the answers

#

now i wonder if it costs more to do ServerFunction -> ServerFunction rather than SomeFunction -> ServerFunction or SomeFunction -> SomeFucntion

#

i would assume it doesnt change much (or anything) to execute a function on server if we are already on server

maiden flame
#

Did you check? There should be a GetUniqueNetID node, which allows you to associate the ID with a specific Player State.

torpid whale
#

Hello

#

Someone know why my multicast only call client and not call server? i dont have a switch has autorithy

storm grove
#

Lets say I wanted to wait for all clients to connect before calling start game, how would I know if someone is currently in progress joining?

Basically clients need to send some information and with that I customize some stuff (like item customization stuff client side that needs to be shared), I am having a race condition where code assumes playerstate is valid and the data is sent, but its not. Any tips would be great

maiden flame
#

@torpid whale It's only calling on one client, not all clients? Then you're probably calling the Multicast from that client, and not the server. The server must call it for all clients + the server to receive it.

maiden flame
#

O

torpid whale
#

O

#

hahaha

maiden flame
#

So if you print string the multicast event, there's no server?

torpid whale
#

nop

#

only client

#

I put a has authority and connect the authority pin, and it doesn't print anything

grizzled plank
#

maybe you call server from else where?

torpid whale
#

another event?

grizzled plank
#

yea

torpid whale
#

i will try

#

thanks

grizzled plank
#

i had a problem yesterday that if i called server before MC then it would fail, but if i call only MC it succeeded

#

because server was called on another event that sent it through interface

torpid whale
#

There I saw this message in the outlog, I think my actor does not have a valid connection for the rpc, I will be trying to change the order of execution of the events, thank you all

grizzled plank
#

is there a quick way to sync actor physics? (not static mesh)

quasi tide
dark edge
grizzled plank
#

well maybe not the physics, but what do i need to do in this situation?

#

even if i bump in a cube it gets out of sync

gusty aurora
#

Quick question....Im hoping it's simple.

So, I am basically rendering a target using a Camera floating far above the First Person Character. to simulate a Minimap. All is setup fine and I see me on the Minimap as it should be in 1 Player. However, in Multiplayer, the camera focus seems to only work for the first indexed player, all other players see what the 1st Indexed player sees. How can I make these cameras only show what is on the Owning Client?

grizzled plank
#

@dark edge this is the same cube for everyone

kindred widget
# gusty aurora Quick question....Im hoping it's simple. So, I am basically rendering a target...

Two things. Make sure you disable the render target capture on pawns that are not the local player. Second. Don't use an asset in the content browser. Createa new rendertarget and pass it to what you need. This way each PIE session creates it's own instance. If you don't do the secodn thing, then it'll work normally in standalone and cooked games. But PIE instances use the same asset and so one drawing to it will overwrite the rest.

gusty aurora
fierce egret
#

Could there a reason for that Repnotify runs on every client except owner client?

If i print in repnotify:

1 Client 1 Dedicated Server - Only server prints
2 Client 1 Dedicated Server - 1 client and 1 server print

kindred widget
#

Is client setting it anywhere else?

kindred widget
#

Well, that or the value didn't replicate to one client because it was considered not relevant.

fierce egret
#

Yes, it really was skipOwner. Thanks for your help

#

I couldnt find it for hours 😄

#

It is not my project, so i was not aware of it

kindred widget
#

You get used to it. 😄 Just have to go through the checklist.

vagrant dragon
#

Hi, anyone know how to replicate a USkeletalMeshComponent with physics over the network in c++??? If someone does dm plzz

grim rain
#

Hello how to make this work in multiplayer?

vagrant dragon
grim rain
vagrant dragon
dark edge
dark edge
#

but i wouldn't repnotify the parameter, I'd repnotify the boolean state

#

so the timeline can run independently on all machines

grizzled plank
#

i see it in class defaults of the blue print, but its not working

#

i think it has something to do with forces

#

because gravity works well, but if i add force to it then it breaks

dark edge
#

is this just a static mesh actor or did you make the class? Make sure replication and replicated movement is on. I think server-authoritative physics is on by default

grim rain
#

oh wait i got it working i made the toggleTransform event run on server

#

thanks for the help!! :DD

vagrant dragon
grizzled plank
#

with a default scene root, a cube static mesh and a collision box

#

i just noticed that there's a replicate on the static mesh inside the blueprint as well

#

and its ok now 🙂

#

but very laggy

dark edge
grizzled plank
#

like stutters

dark edge
#

replicated physics is NOT trivial

#

especially with interactions with characters

#

since character movement is predicted

vagrant dragon
grizzled plank
#

@dark edge so if i want to achieve what i have right now, how do i do it otherwise?

ruby lodge
#

I have a camera in the menu and want to move it through a UI button press. Now, I would get it through "get actor of class" but other players can join my lobby as well and then it wouldn't work because everyone would have his own camera and this node would get me the wrong camera maybe which would lead to a different players camera being moved instead. So how do I reference it correctly?

#

I managed to move it like this but not to the right spot if I cannot set a new view target

#

so I would like to know if there is a different way to move the owned camera

dark edge
#

the default correction settings are super strict

#

does it at least agree on all screens?

ruby lodge
#

An Interface call might work maybe and then I move it from a different blueprint other than the widget bp. Can anyone confirm?

dark edge
ruby lodge
#

a standalone one

dark edge
#

just make sure the camera is not replicated than everyone can tell it to move however they want

#

Every computer has 1 camera on it which can be moved around independently

ruby lodge
#

Okay, thanks!

grizzled plank
#

it's sort of stutters because it fixes it self

dark edge
#

Yup that's the default physics replication settings being super strict

#

find them in the project settings and loosen them up

grizzled plank
#

ok ty i'll get to it 🙂

tired horizon
#

Hello, the player characters are moving laggy. When testing in the editor everything is normal. When I test it with my friends using the Steam subsystem, there is a lag. How can I fix it?

grizzled plank
#

sorry, but i dont understand how to loosen up the physics defaults, and i looked some stuff up and came across ownership. from what i understood, the owner is incharge of updates. i think that the server is the owner although the client is moving the actor. can it be the problem?

twin flint
kindred widget
twin flint
#

Im using c++ intellisense not giving it to me

sinful tree
ashen plume
#

is there no ENetRole switch?

neon summit
#

How could I add my character to a seat in vehicle without messing up replication?

trim plume
#

No one knows? 🤔
Hopefully the motion matching template is replicated out of the box when it gets released, so we can copy the approach 🤞

short arrow
#

Oh your question got answered already kekw

neon summit
#

I'm experimenting with a top down turn based game just getting it setup. Where would be there best place to store the grid for movement? I'm assuming the playerstate or gamestate?

fossil spoke
#

Since you would want to align it with the World as you require.

neon summit
#

it is.

#

but for the movement and stuff I need a reference to it

fossil spoke
#

I would put it in the WorldSettings, which can be referenced anywhere.

#

You can also conveniently link it directly in the World Settings details panel for the level as well.

neon summit
#

im not sure what you mean. in the gamemode?

fossil spoke
#

No?

#

The World Settings is an Actor as well.

#

Which you can override to add your own properties/functionality to.

#

Like any other Actor.

#

Maybe you need to do some research on the World Settings

neon summit
#

I was not aware that's an actor

fossil spoke
#

The default World Settings class can be changed in the Project Settings.

neon summit
#

interesting

#

how do I create a new world settings class

#

i dont see it as an option to create a bp or im misunderstanding

fossil spoke
#

Its probably not Blueprintable. Meaning you would need to create it as a new C++ class.

#

Im guessing you are BP Only.

neon summit
#

yes..

fossil spoke
#

Well then just put it in the GameState or something

neon summit
#

you making me want to dive into c++ now lol

fossil spoke
#

Go for it

#

You will become a better developer/programmer if you do.

neon summit
#

agreed. that'd probably require to download source. Idk about that right now

fossil spoke
#

No it doesnt.

#

The Launcher builds without source are C++ capable.

#

Maybe you need to learn more about it 🙂

#

Dive in

neon summit
#

I'm diving into top down turn based to help with my cousin to make a game so I don't want to scare him off just yet. lol. But I may want to dive into c++ though.

#

can I edit the engine with having source version?

#

can I download symbols to do that?

fossil spoke
#

You dont even know C++, I wouldnt worry about that.

neon summit
#

i know alittle ig.

#

but alrighty.

#

thanks

fossil spoke
#

Start small, the engine is an extremely technically complex piece of software.

neon summit
#

how is a driver added to a vehicle in a way that doesn't break movement?

#

currently I fake it but I would like for the character to be shot in the vehicle

fossil spoke
#

What do you mean by "doesnt break movement"?

neon summit
#

I believe that it breaks prediction and makes it jittery.

#

disabling the cmc while they are in the vehicle doesn't help

fossil spoke
#

If the driver is a Character and they are in a seat of a Vehicle, they wouldnt be moving on their own at all, so how does prediction come into that?

neon summit
#

im not sure. I just know it breaks the vehicle from moving attaching them to the vehicle

fossil spoke
#

Ok so thats a separate problem.

#

You have 2 Pawns right. The Character and the Vehicle.

#

When you are the Character you have possession of it.

neon summit
#

yes

fossil spoke
#

When you go to get into the Vehicle. Your Controller possesses that instead.

#

And you attach the Character to the Vehicle.

#

Until you exit the Vehicle.

#

Thats a normal setup for something like this.

neon summit
#

yes but it breaks

fossil spoke
#

Nothing jank about it.

#

It breaks because you are not considering all of the interactions between the Character and Vehicle

#

You need to disable all collision the Character has with the Vehicle.

#

Since it would be inside of it.

neon summit
#

i do

fossil spoke
#

Well you arent if its breaking

#

Anything attached to the Character that would follow it would also need its collision disabled for the Vehicle as well.

glad robin
#

Trying to call something in the PlayerController on loading into a level/session. Is there something that exists in the PlayerController, I know I could handle it elsewhere but I thought there might be something in here.

neon summit
#

hm. I may had a component that was interfering. it snaps the wrong way tho. I have this working by getting the character that interacts and setting a skel mesh component on the vehicle

#

but I may be able to get this working this way which is way better

fossil spoke
#

@neon summit An alternative is that you leave the Character Actor itself where it is when it enters the Vehicle and you instead attach just the Skeletal Mesh component to the Vehicle.

#

Obviously you would want to disable all collisions to other Actors so the "invisible" character doesnt interfere.

neon summit
#

that is how I was doing it before

fossil spoke
#

When you exit the vehicle you just teleport it

neon summit
#

right thats my old setup.

fossil spoke
#

There isnt any "correct" solution.

#

Its more about, what works best for your use case.

neon summit
#

how can I do a repnotify and pass values back to the character

fossil spoke
#

Not sure what exactly your referring to there

neon summit
#

the unplugged part is my old method

fossil spoke
#

Ok?

neon summit
#

i need to do the attach on multicast or repnotify.

#

back on the character but I need the player driving position

fossil spoke
#

If you attach the entire Character to the Vehicle you dont need to worry about that

#

RootComponent attachment is already replicated

neon summit
#

well it doesn't show for client

fossil spoke
#

Looking at it now, SceneComponent attachment is also replicated

neon summit
fossil spoke
#

What you can do, is in the Vehicle, have a property called APawn* Driver or something that is replicated

#

That is what would be RepNotify

#

You can then manage all sorts of stuff from that

neon summit
#

I found I had to repnotify on vehicle on old method too on possessed event wait.. im dumb lol

#

this my old rep function on vehicle. but would this allow bp_basecharacters to see also

#

im confusing myself im tired

neon summit
fossil spoke
#

A variable

neon summit
#

i thought so

fossil spoke
#

Replicated Variable

#

Replicated Property

#

Same thing

neon summit
#

just wanted to make sure lol

#

im guesing c++ lingo

fossil spoke
#

Kinda but also not, they have many names.

#

Variable

#

Property

#

Member

#

To name a few

neon summit
#

hm. im not sure how to write the rep function.

#

after attaching in the rep function it doesnt work for server either

neon summit
#

I'm not sure why but the client doesn't want to attach the character

dark parcel
fossil spoke
#

What do you mean expensive?

#

An RPC is as expensive as what you transmit through it

#

A Multicast is just N number of regular RPCs, N being the number of PLayers

#

Maybe, but that doesnt tell you anything because an RPC can have different data attached to it.

#

Not really, you should just aim to reduce the need for to many RPCs

#

And the amount of data they send

#

Avoid Reliable RPCs if you can

#

And favor Unreliable

#

Etc

modest crater
#

Exactly, it shouldn't be a question of how many RPCs can I have but instead, how little can I get away with

twin juniper
#

What would be the correct way to handle damage regarding the Network Prediction Plugin (NPP)? Currently, I have it 'working,' but it seems like a lot of work for this. My current setup (based on MockSimulation) is as follows: HealthInputCmd (IncomingDamage, IncomingHealing), HealthSyncState (Health), HealthAuxState (MaxHealth). These are wrapped into a HealthComponent that allows me to interact with IncomingHealing and IncomingDamage (the input command), which are later consumed during simulation. Thanks!

thin stratus
#

I'm not sure I would pipe health through NPP directly.

#

At least not Input wise

#

I mean if you use NPP in FixTick

twin juniper
#

but how modify it state externally?

#

I mean from other component

thin stratus
#

You can just modify the health SyncState from SimTick of e.g. your weapon simulation

twin juniper
#

ah so its correct / safe to modfy a sync state from other comp as long as is during SimTick method?

thin stratus
#

I would say so but only when you use FixedTick on the NPP

#

Cause then it also gets reconciled together

twin juniper
#

yes, thats the one currently using

thin stratus
#

I wouldn't send any kind of variables that aren't input or local only related

#

That is a hell to fix for cheaters

twin juniper
#

yeah, my main confusion was due the simtick requirement

thin stratus
#

Your e.g. weapon simulation can predict locally and modify the sync state. And I guess you can use Finalize frame to forward the value to your UI via callbacks or so

#

I'm not sure if that all works tbh

#

I ama also new to that stuff

twin juniper
#

yes, will try modifying sync state and see how evolves

#

I appreciate your help. I think all we are new regarding NPP 🙂

thin stratus
#

It could be that modifying SyncState directly could have issues with keeping history, cause only the OutputState is properly doing that

#

You might be able to ensure the Health Sim ticks last and then instead of modifying the SyncState you simply add pending changes that are applied in the Health's own SimTick

#

But that's just thinking out loud

twin juniper
#

Yeah, npp requires a new way to interact

#

also, not helps all included examples are self contained, I mean, they modify their own state not other state (i.e: others components)

thin stratus
#

Yeah. Doesn't help NPP wasn't applied to a full fledged game yet

#

I don't think we will predict health changes on our end

twin juniper
#

yes, so you suggest regular methods to handle health?

thin stratus
#

Just keep it server auth fwiw

#

But depends on the game and requirements

twin juniper
#

I see, thanks for help! have a GN

woven basin
#

The main issue with prediciting health is - what happens at the extreme of like 0 HP. Does the client "predict" the actor is starting to die, and show that montage and remove their target ability? But what happens if that "rolls back" etc - its going to look really bad to a player to think they killed someone/something only to see it pop back to life a few moments later...

dark parcel
#

In my experience playing multiplayer game in laggy environment, the HP bar just stays at 0 until the death is confirmed by the server

hardy turtle
#

Hello guys, I made a lobby system with an invite only session, after players join I would like to do a matchmaking search and transfer all of them into the session that gets found. Somehow either only the other player joins or me. Does anyone know why? Thank you in advance

thin stratus
thin stratus
#

Predicting health is mostly done for instant hit feedback

#

And with everything in FixedTick that might also be fine

#

But I would probably try to predict as little as possible

#

The only things we have relying on each other atm are Weapon and Movement

#

So that doing stuff like ADS makes you slower, and moving makes you hip fire worse etc

knotty briar
#

Hi, I have an event that runs on the server and is reliable. It checks whether an actor has a certain property. This works fine when I use any other component, but it only works sometimes when I use the bp_castle component and causes an error saying that it read none when trying to access property

#

It triggers when I click on the actor, however sometimes it just reads nothing thats being passed through. I tried different meshes to make sure it wasnt the collision

#

thats the code for detected whether the player did interact. It normally works with the interactable component, but when I check for castle component it only works sometimes

#

maybe an issue with the blueprint actor

#

it spawns it at the start of the game

#

when the map is being generated

#

Okay I di some debugging, Sometimes the server just isnt recieving the actor, I set it to reliable, so I dont know if Im missing something at this point, I tried a delay as well

#

If anyone knows why the actor isnt being passed into the server object valid event I would appreciate any help. It works for other actors but not for the castle, even though it is being detected on the hit

#

im going to see if I can save it as a variable first and if it doesnt work, then call the event again

#

Okay I got it working but its a temporary fix. I keep calling the entire thing again if it doesnt select the first time

#

keeps doing it until something is selected

plucky pewter
#

Morning.

knotty briar
plucky pewter
knotty briar
#

thats good. Im doing well, Day off from college here but my final is due in 3 days so Im trying to finish this game hahaha

#

its a pvp tower defense and offense game made fully in blueprints...

#

most things work at this point

#

ive only got the simple stuff left once Ive fixed the bug with selecting the castle

plucky pewter
#

Ooooo n ifty.

knotty briar
#

I mean Im probably gonna continue development for it and release it for both PC and Mobile as I set the UI in a way where it works for both, but Im not sure about whether its gonna be good to implement a dedicated server as I probably cant afford that

#

After this Im gonna develop a survival type game thats low poly and involves rpg mechanics and levelling up

#

but yeah way too soon to think about that

plucky pewter
#

I say it's never too soon. You can keep it on the stove...but just keep it at a low simmer back burner sort of thing. Be content with the idea you're not cooking yet, just doing prep work.

knotty briar
#

to be honest youre not wrong, Im aiming to release the current game by the end of this year hopefully, but I do need some sort of devlogs online to gather a small audience.

#

its gonna give a good experience for the next game

#

I have made other multiplayer games before but they were college projects part of game jams. I added in steam support and everything, the only issue being network prediction as the pawns were spaceships or tanks and they didnt have the CMC to account for that

plucky pewter
#

I'm green as green can be. trying to work through the setup for multiplayer...It's going rough. I'm playing with Playfab a bit and it's nice. Blueprints work GRAND coding is fine too....but things are weird...I break a plugin...it compiles for the editor. I leave the plugin code unaltered...it doesn't compile for client builds. But will for server....

knotty briar
#

playfab provides dedicated servers right? from what I can remember at least

plucky pewter
#

Yeah yeah...They offer a LOT. I had things working and now they're not.

nocturne fiber
#

so, I solved most of the problems in my blueprint, but there's this particular problem:

knotty briar
nocturne fiber
#

these are widget button call and teleport actor

plucky pewter
#

So what are you trying to do exactly?

nocturne fiber
#

the problem is that at the end of these teleport actor, there's a call to the widget, but it access none if search for widget reference

#

why is that?

#

sorry for spam

plucky pewter
#

You have to get that specific widget.

nocturne fiber
#

I get it in the same blueprint

#

the blueprint is the character

#

i create widget

plucky pewter
#

OK.

nocturne fiber
#

then assign it to a variable

#

as you can see, on top right is the widget creation and assignment of variable

#

in the same blueprint

#

it is replicated at the beginning of the flow

#

why does it access none?

plucky pewter
#

I mean if you just have one instance of that widget you could try and get it while it's created and then go from there. I ran into this. ALOT with the UI stuff.

#

And when you placed the setter...you dragged OFF the create node?

#

Just creating a new variable will not be the same as getting THAT specific widget.

nocturne fiber
#

I really cannot understand the error

#

I'm beginner and need to finish this for a commission( this is not my main work and surely will not redo a multiplayer thing soon)

#

I'm primarily a professional 3d artist xD

plucky pewter
#

I'm a bartender so. Hey. We're all learning.

nocturne fiber
#

so could you explain to me the problem like I was a 5 years old?

plucky pewter
#

If I remember correctly.

#

It's like this. Imagine if you had 3 of those widgets created but needed just one specific one. How would you get that one? Between three identical widgets.

#

I would have THOUGHT just creating an object reference variable would be enough.

nocturne fiber
#

but it's not

#

cause the programming logic is a whole dimension

#

and the F*** button doesn't help us

plucky pewter
#

You physically need to drag off that create node and store what comes off that node as a variable and NOT create a new one and then set it to what you created.

nocturne fiber
#

?

#

I didn't understood

#

I created the widget and set the variable every time the F button is pressed while hovering the interaction area

#

what's wrong with that?

#

and it's made in the character

#

should be instantiated

plucky pewter
#

Is that widget only created 1 time?

#

Hold on...

nocturne fiber
#

in the flow, when I press the F button, it create the widget

#

then assign as variable

#

then , down, when receive input from the widget button pressed( there are 6 buttons one for each floor) starts off the teleporting

#

and then redirect to widget to close it

#

what's wrong with that?

plucky pewter
#

Well I don't think there is a way to explicitly destroy widgets via blueprints as far as I have figured.

nocturne fiber
#

how to close this damn widget?

plucky pewter
#

Ran into the same question.

nocturne fiber
plucky pewter
#

Well I arrived at an answer for a question I hadn't asked yet but...it was interesting to see. Concerning how I should put this ui together.

#

Well then this is part of the problem if you are creating that widget.

#

many many times.

#

It's akin to having 50 face down cards and asking the engine to give you the ace of spades when they all look the exact same. AS FAR AS I HAVE COME TO LEARN.

#

--allegedly remove from parant doesn't exactly just unload the widget. Haven't delved deeper into. But I crossed a few conversations talking about it.

nocturne fiber
#

I just need a way to close the widget of the player owning it, but cannot find one

#

going back and forth from character bp and widget bp

#

with custom event

#

only to get the accessed none error

plucky pewter
#

from the little bit I saw...you'd have to do it in c++

nocturne fiber
#

an alternative?

#

but the problem is that in the host it works properly

plucky pewter
#

I can't say for sure I haven't really had a need to delete user widgets directly UI isn't that messy....yet. all placeholder stuff.

nocturne fiber
#

only in client it does not

#

it's a replication problem

plucky pewter
#

In that case...you are in deeper waters than I can safely chat in. I understand Replication 100% but how the engine specifically handles replicated events and variables. Eh...I don't know.

#

Well how could...it work?

nocturne fiber
#

T_T

plucky pewter
#

I'm just cautious. Bad advice is worse than no advice at all.

neon summit
#

You need to tell the owning client to remove

plucky pewter
#

Anyone using the lastest GSDK from PlayFab?

#

--Yeah shooting in the dark.

nocturne fiber
#

@neon summit but this approach is correct to initialize the flow?

neon summit
#

Yeah but depends on your setup tho

nocturne fiber
#

what do you mean

neon summit
#

Where do you store your widgets

nocturne fiber
#

even with another replication on the call, doesn't work

#

the elevator widget is child of main widget

#

it cannot recognize this variable

#

at the end of the teleport actor

#

oh forgot to set the replication event correctly, retry

#

okay somehow managed to solve it lol

#

needed anothe replication

#

r*

#

yeah my artwork

#

I'm so proud of myself, being a null in programming xD

#

it don't work again XD

worthy oak
#

still accessed none?

nocturne fiber
#

now it reverted on back, where it flashly teleport briefly , but not move in any room

#

no error

#

bah

nocturne fiber
#

why with this setup, it print 2 time "is client"

#

I have 2 player start, but with the branch I choose which is client and which is server

#

how can I obtain 2 same print is client?

neon summit
#

because the server is also a client

nocturne fiber
#

how to prevent that?

#

using has authority?

#

but if i print server side

#

it says 2 times too

neon summit
#

do a is locally controlled branch

nocturne fiber
#

cannot find this node

#

I am inside actor component

neon summit
#

oh

#

what are you trying to do

nocturne fiber
#

i'm fixing the line trace of actor component

neon summit
#

you could try has authority ig

nocturne fiber
#

in which designates lines to interpret ambiance and find collision with bp interaction area

#

the same, 2 print is server, 2 print is client

neon summit
#

remove the is server check

nocturne fiber
#

i simply want that every instance of character run the code