Lets say hypothetically that every npc is made of one mesh.
@maxgorden4996 жыл бұрын
Thanks for all the content you provide :) Never understood how to implement if an object is in view or not, now I do! Thank you
@gerardt3284 Жыл бұрын
I'm working on being able to handle 1000 NPCs on screen all at once, all crowding around the player and not going inside each other
@ilittlebig1986 жыл бұрын
I'm also handling my npcs like this
@gryphoncook53382 жыл бұрын
it would be nice if we had all the variables definitions too
@Fezezen4 жыл бұрын
local tick = tick
@jamesmann2606 жыл бұрын
Interested to see where this goes.
@elocore17025 жыл бұрын
What is the % Activity you get from the script while this is running from the script performance tab
@Fujui3 ай бұрын
How would i do this with alot of logic per npc, like deepwoken?
@kevintst26 жыл бұрын
So clever
@etrevi2 ай бұрын
can you make a tutorial on this?
@Fezezen5 жыл бұрын
How are you "hiding" them once they go off screen? Are you deleting their model? If so, wouldn't re-adding their model once they're on screen again, bring down the performance?
@uppishowl34565 жыл бұрын
He is "Hiding" them. It's exactly what it says. He's making it so it isn't visible anymore. Now, this can be done plenty of ways. I'd say the method he's doing is changing the parent back and forth through replicated storage and something in the workspace so he doesn't have to change the transparency of EVERY SINGLE PART each time. That's what I think he's doing anyways.
@r0lfu_4 ай бұрын
he said he was setting transparency to 1
@unusuallight49596 жыл бұрын
How are you running the client method? Do you have a local script that handles all of the client stuff or do you do it some other way
@loganhunt30746 жыл бұрын
Do you tell the server to update their location at all or is movement completely client side?
@sleitnick16 жыл бұрын
Both. The client handles it at high frequency, and updates the server every second (only if moving). The server then validates the movement (i.e. prevent exploits)
@loganhunt30746 жыл бұрын
How would you handle this system if there were multiple people in a server? I understand that what you have is based purely for singleplayer games but what would you do to change it so that different viewports would be able to view and update npcs within any of these viewports.
@weirdthings9583 Жыл бұрын
May I ask why you are not just using 'NPC.Humanoid:MoveTo(Goal.Position)? Is it for performence? That is my only guess.
@catgirlinspace6 жыл бұрын
How are you checking if the NPC is within the viewport?
@sleitnick16 жыл бұрын
At the beginning of this video, look at line 182 and 183
@catgirlinspace6 жыл бұрын
ROBLOXcrazyman32 So there is a use for that function. I always thought that the WorldToViewPoint function was useless.
@shokobata6 жыл бұрын
So basically u are just rendering and calculating npcs that are on screen
@sleitnick16 жыл бұрын
Pretty much. Every NPC is having its new position updated and such, but not actually applied until that position is on screen
@shokobata6 жыл бұрын
ROBLOXcrazyman32 OK thank you I should try something like that