Page MenuHomeFeedback Tracker

Ability to have attachTo only be local or new function
Need More Info, NormalPublic

Description

Since using attachTo even on a local object is broadcast to players. I think it would make sense to have either a local param in attachTo or a new function. lightAttachObject is also another function similar attachTo but is local for lights?

Ex: attachToLocal || attachTo [object2, offset, memPoint, followBoneRotation, isGlobal]

Details

Severity
Feature
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

Fraali added a subscriber: Fraali.Dec 22 2021, 6:15 PM
SaMatra added a subscriber: SaMatra.Mar 2 2023, 4:11 AM

I also had a need for such feature and found a hacky workaround. The way to solve it is to attach through a intermediary local object (createVehicleLocal)

[OBJECT 1] <-attachTo-> [LOCAL OBJECT] <-attachTo-> [OBJECT 2]

When one of two objects in attachTo is local, attachTo doesn't broadcast it.

This hack also lets you locally change positions of global network synced objects, just attach it to local object and move the local object, no network messages involved.

Beware though, there is a thing called "error" that accumulates the more object's state differs from state received from the server. I think this error affects precision of interpolation or something, also causes yellow chains to show up? Basically its better not to abuse this too much.

Let me understand what this ticket is about. You want to have global object to be attached to global object but the changes not to be broadcast? If this is the case then request denied. It would cause all sorts of desync which will affect network functionality. If either or both objects are local, as it is the broadcast doesnt happen. Could you explain what exactly is this all about?

BIS_fnc_KK changed the task status from New to Need More Info.Oct 22 2023, 8:48 AM
This comment was removed by darkguru8.
darkguru8 added a comment.EditedOct 22 2023, 2:05 PM

Let me understand what this ticket is about. You want to have global object to be attached to global object but the changes not to be broadcast? If this is the case then request denied. It would cause all sorts of desync which will affect network functionality. If either or both objects are local, as it is the broadcast doesnt happen. Could you explain what exactly is this all about?

Example 1: I create a local shovel via (createVehicleLocal) on clientside, and attach it to a player. No other players/server will get the broadcast, except for the player that made that shovel (since the shovel is only local to the player)

Example 2: I create a local NPC via (createVehicleLocal) on clientside, disableSimulation, and create "Logic" via createVehicleLocal so it can do various animations. (ref: BIS_fnc_ambientAnim)

Reason:
https://community.bistudio.com/wiki/attachTo
states that it has "a global effect means that all the computers will receive it" and no indication of anything else,
Am I mistaken that ex 1/2 would broadcast GLOBALLY or is the wiki incorrect and should be changed to have a clause about not broadcasting if (local attached to global / local attached to local)?

This comment was removed by BIS_fnc_KK.

As far as I can see if any or both objects are local it doesn’t broadcast. If this is not the case I’d like to hear about it

@BIS_fnc_KK Would that same logic be applied to https://community.bistudio.com/wiki/setObjectScale? If I setObjectScale on a local simpleObject other players won't receive the broadcast?
Is there a way to know if the data was broadcast to clients without seeing a visual change somehow?