#(JustinS) raycast in all directions
1 messages · Page 1 of 1 (latest)
(JustinS) raycast in all directions
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
I feel like there's a better way
I wrote a little script for that can distribute n points equally on a sphere
Idk, might be useful for some people. It's some pretty basic math that I stole from stackoverflow https://paste.denizenscript.com/View/133998
Content of Denizen Script Paste #133998: Unnamed Denizen Script Paste... pasted 2025/06/13 05:54:25 UTC-07:00, Paste length: 685 characters across 11 lines, Content: - define origin:<player.location> - define diameter:5 &nbs...
- define diameter:5
- define samples:200
- define phi:<element[5].sqrt.sub[1].mul[<util.pi>]>
- repeat <[samples]> as:n:
- define y:<[n].div[<element[<[samples]>]>].mul[2].sub[1]>
- define radius:<element[1].sub[<[y].mul[<[y]>]>].sqrt>
- define theta:<[phi].mul[<[n]>]>
- define x:<[theta].cos.mul[<[radius]>]>
- define z:<[theta].sin.mul[<[radius]>]>
- define loc:<[origin].add[<location[<[x].mul[<[diameter]>]>,<[y].mul[<[diameter]>]>,<[z].mul[<[diameter]>]>,<[origin].world>]>]>
- spawn shulker_bullet[gravity=false] <[loc]>```
But I feel like it's a little slow, but that's probably the spawn command
By disabling debug it's actually pretty fast. Happy with this result