altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

Server side created objects are not visible

Open edgarasx opened this issue 1 year ago • 6 comments

Description of the problem

Server side created object are not visible for the player

Reproduction steps

const gameObject = new alt.Object('ind_prop_firework_04', player.pos.sub(0, 0, 1), player.rot);
gameObject.dimension = player.dimension;
gameObject.streamingDistance = 30;
gameObject.frozen = true;

alt.logError(
    'DEBUG Object', 
    {
        valid: gameObject.valid, 
        pos: gameObject.pos, 
        rot: gameObject.rot, 
        dimension: gameObject.dimension, 
        streamed: gameObject.streamed, 
        streamingDistance: gameObject.streamingDistance, 
        timestamp: gameObject.timestamp, 
        type: gameObject.type, 
        visible: gameObject.visible, 
        id: gameObject.id, 
        lodDistance: gameObject.lodDistance, 
        netOwner: gameObject.netOwner
    },
);

Output:

[15:34:27][Error] DEBUG Object {
  valid: true,
  pos: Vector3 {
    x: -1596.4615478515625,
    y: -937.1087646484375,
    z: 13.013916015625
  },
  rot: Vector3 { x: 0, y: 0, z: 0 },
  dimension: 0,
  streamed: false,
  streamingDistance: 30,
  timestamp: 0,
  type: 3,
  visible: true,
  id: 5,
  lodDistance: 100,
  netOwner: null
}

The object (which is created with a command) is not visible for the player, even when teleporting away and to the object again. Other server side objects (that are created on server start) are not visible either, this is how they are created:

const gameObject = new alt.Object(this.objectModel, this.pos, rot);
gameObject.frozen = true;
gameObject.streamingDistance = 30;

Expected behaviour

The objects should be visible

Additional context

No response

Operating system

Windows 10

Version

16.0.0-rc.4

Crashdump ID

No response

Confirmation of issue's presence

  • [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.

edgarasx avatar Jan 12 '24 14:01 edgarasx

Some objects are working, others aren't. In the video you can see how I place 3 different firework objects (placed objects are created server side) and only one is visible. Then I drop the 3 objects and all 3 are visible (dropped objects are created on client side).

https://streamable.com/v8ktzu

edgarasx avatar Jan 12 '24 16:01 edgarasx

Added debug logs client side, it seems the object is sent to the client but it is not visible image

edgarasx avatar Jan 12 '24 17:01 edgarasx

Experiencing same issue

Arochka avatar Jan 12 '24 22:01 Arochka

Having same issue too on newest linux server build

udo6 avatar Jan 14 '24 06:01 udo6

Look related to netowner, 2 peoples in the same area:

  • First player see 4 objects
  • Second only 2 objects
  • First player go out stream range
  • Second player see 4 objects

Arochka avatar Jan 14 '24 11:01 Arochka

I have no issues if I use frozen = false. Maybe this helps to find the bug.

jonasesser avatar Feb 22 '24 00:02 jonasesser