altv-issues
altv-issues copied to clipboard
Server side created objects are not visible
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.
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
Added debug logs client side, it seems the object is sent to the client but it is not visible
Experiencing same issue
Having same issue too on newest linux server build
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
I have no issues if I use frozen = false. Maybe this helps to find the bug.