-
What do you want to achieve? Keep it simple and clear!
I want to create a short of “Lidar effect” in Roblox where individual “pixels” can be placed onto a part.
Here are examples of what I want to achieve: -
WHAT THE HELL IS THAT THING?!?! (LIDAR but in Roblox) - YouTube
-
Roblox - The Unfinished Swan Inspiration - YouTube
In these examples, there seems to be a lot of parts/decals, but the game doesn’t seem to lag for the most part. -
What is the issue? Include screenshots / videos if possible!
When I create parts using a raycast position, it generates lag due to the number of parts. Is it possible to implement a system similar to the examples that would enable lower-end devices to render everything without significant lag? -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried using raycast to create parts and copying the part’s color, but this didn’t solve the issue. I also searched the Developer Hub but couldn’t find a viable solution.
An effect like this should be done on the client if you’re already not doing so. If you need other player’s scans to be taken into consideration, just have the pixels created by a scan replicate to all other players.
Raycasting is probably the optimal method here: just sweep the screen top-down with a series of raycasts to place your parts. Fudge around with the amount and speed to balance the strain caused by creating parts versus the visiblity of the effect. Also, you probably don’t want to allow players to scan over already identified areas (unless you desire to do so).
The first video you liked seems to be placing decals on invisible parts. All you’ll need is some math to determine where to place these parts in order to have the decal face the scanning player. Of course, you can use physical parts instead and just place them at the end of your Raycast.
This shouldn’t be that intensive of a process when handled on the client.
Have a world that is pitch black but does infact have parts, maybe set lighting.brightness to 0. and a script that populates closer areas with more dots and you can check the distance using Raycasts.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.