Moving obj to point along time

   4896   6   0
User Avatar
Member
66 posts
Joined: 9月 2008
Offline
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
Edited by - 2009年4月4日 18:59:37
NicoZ
User Avatar
スタッフ
3453 posts
Joined: 7月 2005
Offline
yep…try the object CHOP
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
66 posts
Joined: 9月 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!

Attachments:
toTarget.hipnc (52.7 KB)

NicoZ
User Avatar
Member
7362 posts
Joined: 7月 2005
Offline
There's lots of ways to do this. I personally think that the easiest way to do this type of constraint is to just keyframe a Blend Object's Sequence parameter. I've attached a modified file using the Blend Object.

Attachments:
totarget_233_blendObj.hipnc (63.6 KB)

User Avatar
Member
66 posts
Joined: 9月 2008
Offline
Thats a great solution!, much simple than mine's. I didn't know about the Blend object. Thanks for the help!
NicoZ
User Avatar
Member
4 posts
Joined: 4月 2009
Offline
nzabala
Thats a great solution!, much simple than mine's. I didn't know about the Blend object. Thanks for the help!
well ,i have a good way.
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 - 2009年5月16日 03:13:33
User Avatar
Member
4 posts
Joined: 4月 2009
Offline
nzabala
Thats a great solution!, much simple than mine's. I didn't know about the Blend object. Thanks for the help!
well ,i have a good way.
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