Mon, Feb 3, 12:36 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Feb 03 12:46 am)



Subject: How do I return the world position of an attached prop?


trepleen ( ) posted Wed, 14 February 2018 at 2:18 PM · edited Mon, 03 February 2025 at 12:32 PM

I have a prop attached to V4, but I need the props world position.

I have python shell open right now. I need to do something like this:

Print actor.attachedProp.worldXYZPosition

Unfortunately Poser won't show the world position if the prop is attached to something, it only shows it's XYZ in relation to it's parent.


Boni ( ) posted Wed, 14 February 2018 at 2:34 PM

This may be simple and not what you are looking for ... but have you tried selecting the prop and then using the pose camera?

Boni



"Be Hero to Yourself" -- Peter Tork


trepleen ( ) posted Wed, 14 February 2018 at 2:57 PM

Unfortunately changing camera's does not reveal an attached props world position. It still shows it's xyz in relation to it's parent.


ockham ( ) posted Wed, 14 February 2018 at 6:57 PM

Looking back at my old stuff, it seems that I always used WorldDisplacement. As I recall, this worked for all objects regardless of parenting or body-part-ness.

(X,Y,Z)=actor.WorldDisplacement()

My python page
My ShareCG freebies


KarinaKiev ( ) posted Thu, 15 February 2018 at 2:47 PM

I didn't try this, but who knows:

If (in Poser's Hierarchy Editor) you parent a prop (manually) to UNIVERSE (i.e. unparent it from the figure), it's real coordinates are shown in the prop's parameters.

Maybe unparenting the prop in Python, then reading it's (hopefully) RW-coordinates and finally reparenting it to it's original parent could do the trick?

Karina


trepleen ( ) posted Thu, 15 February 2018 at 4:55 PM

ockham posted at 4:55PM Thu, 15 February 2018 - #4324374

Looking back at my old stuff, it seems that I always used WorldDisplacement. As I recall, this worked for all objects regardless of parenting or body-part-ness.

(X,Y,Z)=actor.WorldDisplacement()

Would you happen to know how to print that out in the python shell?


ockham ( ) posted Thu, 15 February 2018 at 5:39 PM · edited Thu, 15 February 2018 at 5:40 PM

No, I haven't used the python shell. I suppose you could do something like

(X,Y,Z)=actor.WorldDisplacement()

print "X = %f, Y = %f, Z = %f" % (X,Y,Z)

My python page
My ShareCG freebies


trepleen ( ) posted Fri, 16 February 2018 at 7:44 PM

ockham posted at 7:44PM Fri, 16 February 2018 - #4324447

No, I haven't used the python shell. I suppose you could do something like

(X,Y,Z)=actor.WorldDisplacement()

print "X = %f, Y = %f, Z = %f" % (X,Y,Z)

Thank you.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.