set {_reference} to vector from yaw {_yaw} + 90 and pitch 0
set {_v} to spherical vector with radius {_radius}, yaw 0, pitch 0
loop floor(360 / {_step-size}) times:
set {_temp-v} to {_v}
if {_pitch} is not 0:
rotate {_temp-v} around {_reference} by {_pitch}
set {_locs::%loop-number%} to {_center} ~ {_temp-v}
add {_step-size} to yaw of {_v}
return {_locs::*}```
#Rotate particle to another particle
1 messages · Page 1 of 1 (latest)
circle function ^
I think you can just use this with the other particle as it’s center
I'll try to use that, thanks!
https://i.gyazo.com/24316a83be9c4a6f3d217b75733ebc21.mp4 just like the first one in the video
then swap the particles, or wdym?
wdym by swap?
I don't get your issue
this is basically my aim
you want the end rod particle around the soul?
i want it so that the soul will rotate on the end rod
in the image here, its not rotating (not spiraling)
so how is this wrong then?
it is not spiraling
sine?
alright, thank you!
okay I can't find it rn but I think I got something similar but I'm not home yet
I'm not sure, I really don't exactly remember how it was done again, I'll check how I did it soon
alright, thank you! Just ping me anytime
alright 👍
bump
I can't find my thing anymore but I'm trying to recreate it
thank you sir!
bump
I'll just go for the easy way and not try to use waves
after you showed me the video I wanted to try it for myself too xD
I'll ping you once I've made some progress on the spiral
- get vector from player's pitch & yaw
- get a reference vector from normal yaw and pitch +/- 90
- set ref's vector length to spiral radius
- rotate ref around vector
yeah I was gonna do that now
idk what I did wrong but it's making an 8 now lol
figured it out
@primal vault
^
(sorry if I pinged rage grim, if I did I didn't mean to)
edit, I didn't
why not
bc I'm stupid currently, I can't figure out what I'm doing wrong
I'm probably not even close
set {_v} to vector from yaw {_e}'s yaw and pitch {_e}'s pitch
add 1 to {_n}
set {_n} to 1 if {_n} > 12
set {_o} to vector from yaw {_e}'s yaw + 90 and pitch {_e}'s pitch + 90
set {_o}'s vector length to 0.5
rotate {_o} around {_v} by mod({_n} * 15, 360)
#particle stuff at {_e}'s location ~ {_o}```
this isn't the entire code but it's the part that does the spiral
also yk %loop-counter% exists now
does that work for while loops?
yeah
okay then I'll use that
set {_v} to vector from yaw {_e}'s yaw and pitch {_e}'s pitch
set {_n} to mod(loop-counter, 12)
set {_o} to vector from yaw {_e}'s yaw and pitch {_e}'s pitch + 90
set {_o}'s vector length to 0.5
rotate {_o} around {_v} by mod({_n} * 15, 360)
#particle stuff at {_e}'s location ~ {_o}``` idk what I did wrong this time but now it looks weird at certain angles
weird yaws and pitches: 0, 45 180, 45 0, -45 180, -45
actually anything with about a 45/-45 pitch looks a bit off
set the vectors outside of the while loop
and make the rotation a constant instead of using modulo
set {_o} to vector from yaw {_e}'s yaw and pitch {_e}'s pitch + 90
set {_o}'s vector length to 0.5
while ...:
loop 64 times:
set {_x} to mod({_x} + 1, 360)
rotate {_o} around {_v} by 360/64
lerp 3 of dust using dustOption(color({_x}), 0.5) at {_e}'s location ~ {_o}``` got this rn
(ignore the {_x})
it's still acting weird for 45/-45 pitches
it's like a disc
is your yaw around 180/-180/0?
for some reason 45, 90/-90 works fine but 45, 180/0 doesn't
works fine for all angles idk
is there even any difference between your one and my one? (besides the while loop)
colour, draw location, step size
on rightclick with kelp:
set {_e} to player
set {_v} to vector from yaw {_e}'s yaw and pitch {_e}'s pitch
set {_ref} to vector from yaw {_e}'s yaw and pitch {_e}'s pitch + 90
set {_ref}'s vector length to 0.5
loop 30 times:
rotate {_ref} around {_v} by 360/30
draw 3 of dust using dustOption(red, 1) at location 1 infront of {_e}'s head ~ {_ref}
mod(loop-value, 4) = 0
wait 1 tick```
can copy paste it and see if it still has problems
k it worked
first 4 lines are identical so that can't be it
loop 30 times or loop 64 times shouldn't matter
the rotate is the same too except for the amount but the proportion is the same
and the particle spawning is the same
I don't get what I did wrong
I'm guessing it must be the while loop
set {_v} to vector from yaw player's yaw and pitch player's pitch
set {_o} to vector from yaw player's yaw and pitch player's pitch + 90
set {_o}'s vector length to 0.5
loop 64 times:
set {_x} to mod({_x} + 1, 360)
rotate {_o} around {_v} by 360/64
lerp 3 of dust using dustOption(color({_x}), 0.5) at location 1 infront of player's head ~ {_o}``` this worked
hello just woke up
wondering how could i integrate that to my code so that it spins around the end rod
this works btw, but i don't know how to integrate this too huhuhu i'm dumb
just use the end rod particle's location, pitch and yaw
or whatever you used to get it's movement
ok i'll try
how did you make the line move?
set {_f} to location {_m} meters infront of {_beam}
put the set vector stuff outside of the loop (not the rotate)
wait where is your main vector
main vector, the beam?
the {_v} here
increase the amount that it rotates by
nice
THANK YOU SO MUCH!!!
does it work correctly in these directions:
@cold whale @rotund quail thank you for the both of you, sorry for ping!
yess
looks like this now
I can't really see it
there
that's correct right?
yeah that's already good for me
want it colored? ;D
hope so but idk how you did the color function XD
lerp 3 of dust using dustOption(color({_x}), 0.5) at {_l} ~ {_o}
function color(x: integer):: color:
set {_r} to (sin({_x}) + 1) * 127.5
set {_g} to (sin({_x} + 120) + 1) * 127.5
set {_b} to (sin({_x} + 240) + 1) * 127.5
return rgb(round({_r}), round({_g}), round({_b}))```
thank you!!!!!!
np