Hello, i'm trying to blend particle rotation to nulls.
The simulation is a rolling cube style who ends to an end position, aligned to X Y or Z axis.
Since my particles are rolling i can't straight align them when they reach the end rotation/position without having them flipping like 180 degres rapidly.
I want them to align to the closest 90 degres angle...
I know this is a sort of modulo trick but my mind is stucked here...
Do someone can help me ?
Align particles to closest Axis
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: Align particles to closest Axis
Well, like i though using euler isn't working well in certain angles
I think i need to use vectors instead, don't know where to start...
I think i need to use vectors instead, don't know where to start...
You do not have the required permissions to view the files attached to this post.
-
iamVFX
- Posts: 697
- Joined: 24 Sep 2010, 16:28
Re: Align particles to closest Axis
Ok, since nobody want to answer, I'll take a step and will advise you to use linear or (if it still cause flipping) quaternion interpolate nodes under Tool -> Math -> Basic tab from an ice tree panel
And, sorry, I cannot understand the effect you are looking for. Some of the screenshots or example scene would be very helpful
And, sorry, I cannot understand the effect you are looking for. Some of the screenshots or example scene would be very helpful
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: Align particles to closest Axis
Hi,
I have a some particles emited randomly who walks (rolls) to a target grid of positions, each particles to a different target position.
Since particles rotates during theres "walk" when they reach te target position I need also them to match the target orientation.
But since they are "walking" in a certain order of rotation when tey reach they're final position they can't for example just at the end rotates in an inverted order just to match the right rotation, so I need to match the closest axis of the target.
Anyway
Now i've something, to orientation is rightly choosed, needs now to also match the third angle because now i'm working with vectors...
Thanks !
I have a some particles emited randomly who walks (rolls) to a target grid of positions, each particles to a different target position.
Since particles rotates during theres "walk" when they reach te target position I need also them to match the target orientation.
But since they are "walking" in a certain order of rotation when tey reach they're final position they can't for example just at the end rotates in an inverted order just to match the right rotation, so I need to match the closest axis of the target.
Anyway
Now i've something, to orientation is rightly choosed, needs now to also match the third angle because now i'm working with vectors...
Thanks !
You do not have the required permissions to view the files attached to this post.
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: Align particles to closest Axis
Well,
Here is the working one this time !!
Please excuse my for my very bad english, and my poor knowing when dealing with rotation... There is no doubt that with some dot/cross product this tree could be reduced to a minimum ...
Here is the working one this time !!
Please excuse my for my very bad english, and my poor knowing when dealing with rotation... There is no doubt that with some dot/cross product this tree could be reduced to a minimum ...
You do not have the required permissions to view the files attached to this post.