Hi! Im trying to move an object to the position of a point (or another object), starting from its position and moving along time until it's in the same position of the point. With the ch() reference i get the target's position and I try something like this:
if(ch(“/obj/ball/tx”) < ch(“/obj/point/tx”), 0+(ch(“/obj/point/tx”)*($F / 100)),ch(“/obj/point/tx”) )
But I get a “Recursion too deep” error from ch(“/obj/ball/tx”) and its logic.
Is there some variable where i can get de current tx of the object? Maybe Chops or a VEX solution? Thanks for the help!
PD: Sorry for my prehistoric english xD
Moving obj to point along time
5907 6 0- nzabala
- Member
- 66 posts
- Joined: Sept. 2008
- Offline
- goldfarb
- Staff
- 3462 posts
- Joined: July 2005
- Online
- nzabala
- Member
- 66 posts
- Joined: Sept. 2008
- Offline
Thanks arctor, after spending some time with CHOPS I finally achieved what I wanted. I don't know if its the most productive way but it works and its procedural . The next step is to apply this effect to N objects. I attach the .hipnc file with my solution.
CHOPS:
2 channel nodes with 3 values each one
One contains de object initial position and the other the target's position
1 Composite
The union between both channels, here is where the interpolation type can be configured (Rise Shape)
1 Stretch ( For tuning )
1 Null ( Order )
In the object that i want to move I used the chopcf() to get che CHOPS values.
And thats all!
CHOPS:
2 channel nodes with 3 values each one
One contains de object initial position and the other the target's position
1 Composite
The union between both channels, here is where the interpolation type can be configured (Rise Shape)
1 Stretch ( For tuning )
1 Null ( Order )
In the object that i want to move I used the chopcf() to get che CHOPS values.
And thats all!
NicoZ
- edward
- Member
- 7871 posts
- Joined: July 2005
- Offline
- nzabala
- Member
- 66 posts
- Joined: Sept. 2008
- Offline
- ChinaNoodles
- Member
- 4 posts
- Joined: April 2009
- Offline
nzabalawell ,i have a good way.
Thats a great solution!, much simple than mine's. I didn't know about the Blend object. Thanks for the help!
use vop sop node, use two positions of your objects to make a velocity,and give the velocity to a particle system,use particles to control your object.
blend shape is also a good way, but it depend on your project. if there are more objects ,that might not be an efficient way.
sorry for my bad english. Hope it can helpyou.
Edited by - May 16, 2009 03:13:33
- ChinaNoodles
- Member
- 4 posts
- Joined: April 2009
- Offline
nzabalawell ,i have a good way.
Thats a great solution!, much simple than mine's. I didn't know about the Blend object. Thanks for the help!
use vop sop node, use two positions of your objects to make a velocity,and give the velocity to a particle system,use particles to control your object.
blend shape is also a good way, but it depend on your project. if there are more objects ,that might not be an efficient way.
sorry for my bad english. Hope it can help you.
-
- Quick Links