Skip to content

Commit fcbe7f8

Browse files
authored
Update object-visibility.md
Added missing `transform`
1 parent 6bb5131 commit fcbe7f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/_docs/the-basics/object-visibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ netObject.CheckObjectVisibility = ((clientId) => {
1616
// return true to show the object, return false to hide it
1717
1818

19-
if (Vector3.Distance(NetworkingManager.Singleton.ConnectedClients[clientId].PlayerObject.position, transform.position) > 5)
19+
if (Vector3.Distance(NetworkingManager.Singleton.ConnectedClients[clientId].PlayerObject.transform.position, transform.position) > 5)
2020
{
2121
// Only show the object to players that are within 5 meters. Note that this has to be rechecked by your own code
2222
// If you want it to update as the client and objects distance change.

0 commit comments

Comments
 (0)