Test if Point is going up or down in unsimulated tree

Discussions about SOFTIMAGEs© Interactive Creative Environment©
ChrB
Posts: 55
Joined: 10 Jun 2009, 11:26

Test if Point is going up or down in unsimulated tree

Post by ChrB » 19 Apr 2012, 09:48

I have some problems dealing with comparing values in nonsimulated trees.

I want to test whether a point is moving up or down. Ice tree is simple, points are moved if inside a null, based on the distance to the null. (get point position > get length of distance to null > add smt > set point position). Now I would like to compare this value to the value before i moved the null to see if the point is moving up or down, but my attempts only work in simulated trees . Any help on how to store the values for comparison?

Thanks,

Christian
Arnold for the masses!

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 12:49
Location: London, UK

Re: Test if Point is going up or down in unsimulated tree

Post by Tekano » 19 Apr 2012, 12:17

oh, not sure, off the top of my head do something like store a height value for each particle but also add the current frame, then to work out on a different frame test the hieght value again but subtract the current frame - or something like that! :-
Gossip is what no one claims to like, but everybody enjoys.

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 16:43

Re: Test if Point is going up or down in unsimulated tree

Post by Chris_TC » 19 Apr 2012, 15:03

ChrB wrote:Any help on how to store the values for comparison?
Port 1: Get Point Position -> Set Data (self.YourAttribute)
Port 2: Your tree to move points based on distance
Port 3: Get Point Position and compare to self.YourAttribute

grahamef
Posts: 281
Joined: 23 Jun 2009, 19:01

Re: Test if Point is going up or down in unsimulated tree

Post by grahamef » 19 Apr 2012, 15:54

Can't you tell the direction based on the value of what you add to the point position?