Jump to content

Keeping particle alignment when velocity hits 0.


Recommended Posts

Hey Guys,

I am working on my vector rotations with vops and wrangles ... I have a particle launcher that aligns the particles normal with velocity vector of the particle. The problem I am having is that the particle is flpping when it stops. 

Here is a test .hip.

Thanks

 

 

c_launch_3.hip

Edited by Mdonovan
Link to comment
Share on other sites

Here is the wrangle code I am using to align the normals...

if (@speed > 5)

{@N = -@v;

v@lastalign = @N;
i@stopped = false;
}
 
if (@speed <= 5){
i@stopped = true;
@N = @lastalign;
}
 
For some reason the normal is still getting set to 0,0,0 even though I am setting it only if the speed of the particle is above 5. It just occurred to me that maybe I should be doing this inside my popnet ?
Link to comment
Share on other sites

42 minutes ago, Mdonovan said:

Here is the wrangle code I am using to align the normals...

if (@speed > 5)

{@N = -@v;

v@lastalign = @N;
i@stopped = false;
}
 
if (@speed <= 5){
i@stopped = true;
@N = @lastalign;
}
 
For some reason the normal is still getting set to 0,0,0 even though I am setting it only if the speed of the particle is above 5. It just occurred to me that maybe I should be doing this inside my popnet ?

That fixed it ... I am doing my alignment inside the popnet and the normal is staying fixed at speed of 0.

Edited by Mdonovan
Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...