ronghester
Member
|
First point always zero for Swing Trail
Swing trail first point always starts from zero. I had this strange problem in my project so i tried to reproduce this in the Rendering\17 - Swing Trail Effect.
Steps :
Change the weapon_matrix.setPosUp : Provide non zero vector say (5,1,5) as a position.
Run the program
You will see in first few frames the trails starts from 0,0,0 and then slowly gets stabilised at the mentioned matrix position. ?
Is there any solution to stop this ?
|
|
03-15-2020 12:57 PM |
|
Harry
Member
|
RE: First point always zero for Swing Trail
This is because all edges of Swing Trail are initialized with zeros:
Code:
T.edges.setNumZero(edges);
You can extend create method to provide your initial values and set up them for example using following snippet:
Code:
REPA(T.edges)
{
T.edges[i].vtx[0].pos=pos;
T.edges[i].vtx[1].pos=pos;
}
|
|
03-15-2020 01:06 PM |
|
ronghester
Member
|
RE: First point always zero for Swing Trail
Thanks
|
|
03-15-2020 01:14 PM |
|
Leotag
Member
|
RE: First point always zero for Swing Trail
Does this snippet work in general or just in this particular case.
|
|
03-26-2020 03:45 PM |
|