Get position of item plugged into subnet?

   3152   6   2
User Avatar
Member
271 posts
Joined: March 2012
Offline
Hi all,
First of all, I'm new at Houdini, so if I ask a stupid question that will be why.
Ok, with that out of the way, I'm just trying to recreate something I did in a bit of software that I usually work in. So far, I did ok but I need to get the position of a camera (or any other item) that is plugged into a subnetwork.
I cannot just use the ch(…) to get a reference to the channel I need, because that object will change, depending on what the input item is.
I've tried plugging the subnet input into a null and referencing that, but I cannot get it's world coords.

So, how can you get the coords of the item plugged into a subnetwork input?
I've attached my current attempt.

Attachments:
go.hipnc.zip (12.3 KB)

User Avatar
Member
271 posts
Joined: March 2012
Offline
What I ended up doing is using the opinput(“.”,0) function to get the name of the input object and used that to build the correct string and get the parameters I needed.
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Check this file to solve your problem my friend ,But I suggest to you make your subnet in the SOP level (Not Object Level) ,this is so simplest than your current project !
for example you can create a specify parameter to refrence your camera with Object Merge SOP in the your SOP level.

Attachments:
JK_go.hipnc (111.0 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Oh !
another case that i forgot to say is that ,Compute_Cam_Pos is not necessary and you can delete Compute_Cam_Pos network and use it's nodes in the go network to make more clearly ! 8)
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
271 posts
Joined: March 2012
Offline
Thank you Joker - I'm just looking through the file now
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
:wink:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
271 posts
Joined: March 2012
Offline
The key was the object merge node and setting the Transform to ‘Into This Object’.
I made a version that was even simpler. I've attached it if anyone wants to take a look
  • Quick Links