Announcement

Collapse
No announcement yet.

Rotating particles randomly on one axis (script ?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rotating particles randomly on one axis (script ?)

    Hi guys,

    I have a bunch of instanced shaped particles heading in one direction but they are all oriented up the same way. I tried this script:

    Code:
    on ChannelsUsed pCont do
    (
    pCont.useOrientation = true
    )
    on Init pCont do
    (
    --insert variables here
    )
    on Proceed pCont do
    (
      count = pCont.NumParticles() 
      
      for i in 1 to count do 
      (
        pCont.particleIndex = i 
       pCont.setParticleOrientation i = [90, 90, 37]
      )
    )
    on Release pCont do
    (
    )
    But it did not work...im not a scripter ! So does anyone know where Im going wrong. I jut inserted the 3 figures in the orientation array to see if anything would happen.....
    Regards

    Steve

    My Portfolio

  • #2
    I'm not sure i understood the question. The script indicates you want them all oriented the same way, right ? Then why not use the standard ops to set a fixed orientation ?

    Regards,
    Thorsten

    Comment


    • #3
      Apologies...I'll try and explain.
      Say I have a bunch of sharks and they are all heading across the screen with their fins on top. For my animation I require the fins to be rotated randomly around the axis of the direction they are travelling.
      Regards

      Steve

      My Portfolio

      Comment


      • #4
        The numbers I put in the script were just numbers to test if the script had any effect on the particles. I would have changed one of them to a randomly generated number..
        Regards

        Steve

        My Portfolio

        Comment


        • #5
          Ah, got you. Well in this case you can still use the rotation operator. Set it to speed space, set the original orientation via x/y/z and use divergence to add a random offset. Or do you mean the orientation should "wobbel" while travelling ?

          Regards,
          Thorsten

          Comment


          • #6
            No it doesnt need to wobble..just initially be randomly oriented around one axis..

            Thanks a lot for the help.
            Regards

            Steve

            My Portfolio

            Comment

            Working...
            X