About Store Forum Documentation Contact



Post Reply 
First point always zero for Swing Trail
Author Message
ronghester Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Harry Offline
Member

Post: #2
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
Visit this user's website Find all posts by this user Quote this message in a reply
ronghester Offline
Member

Post: #3
RE: First point always zero for Swing Trail
Thanks smile
03-15-2020 01:14 PM
Find all posts by this user Quote this message in a reply
Leotag Offline
Member

Post: #4
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
Find all posts by this user Quote this message in a reply
Post Reply