Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name
- @inputs X1 X2 Y1 Y2 Z1 Z2
- @inputs XO YO ZO DistA DistB
- @outputs D:vector Mul P:vector
- @persist Time XF YF ZF IsAtPointA IsAtPointB
- @trigger all
- D=vec(XF,YF,ZF)
- Mul=2000
- if (DistB < 200) {
- IsAtPointB = 1
- IsAtPointA = 0
- }
- if (DistA < 200) {
- IsAtPointB = 0
- IsAtPointA = 1
- }
- function irPontoA() {
- XF = XO - X1
- YF = YO - Y1
- ZF = ZO - Z1
- }
- function irPontoB() {
- XF = XO - X2
- YF = YO - Y2
- ZF = ZO - Z2
- }
- if (IsAtPointB == 1) {
- irPontoA()
- }
- if (IsAtPointA == 1) {
- irPontoB()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement