Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 21 6:06 am)
Billboard trees will work fine... just move the EndPoint out in front of the tree itself, then set the tree to PointAt your desired camera.
The red cross isn't always visible, so numbers like these in the Joint Editor will do the job...
Edit: Oh, I just realized what you're trying to do. I'll bet you want to constrain the up-down movement while following the camera left-to-right.
I remember a long-ago discussion of this. Seems like somebody, maybe me or maybe not, came up with a partial Python solution.
My python page
My ShareCG freebies
Here's a script that does the job in a basic way. Turns the tree (Yrot only) to face the currently selected camera.
It doesn't require any EndPoint setting; just requires a typical billboard tree. Be sure the tree does NOT have PointAt turned on.
import poser
import math
scene=poser.Scene()
tree=scene.CurrentActor()
cam=scene.CurrentCamera()
scene.DrawAll()
tX,tY,tZ=tree.WorldDisplacement()
cX,cY,cZ=cam.WorldDisplacement()
rads=math.atan2( (cX-tX), (cZ-tZ) )
degs=rads * 180/math.pi
yr=tree.ParameterByCode(poser.kParmCodeYROT)
yr.SetValue(degs)
scene.DrawAll()
My python page
My ShareCG freebies
Thanks so much. There are three things I'd wanted to do with point at, and maybe they are all actually doable in some manner.
Pneumatic pistons. This one seems the easiest, I was going to use two proxy objects at both ends and have both parts of the piston point at each other.
Sun facing solar panel. This seems doable with a script. I am not clear though how point at works with infinite lights since they are defined by a direction rather than a location.
Billboard trees, fire and smoke. Also apparently doable with script.
On pneumatic pistons: Yes, that's a trick that works nicely. I've done it before.
A similar script would serve for the solar panels, assuming they have one pivot direction. Use a point light for the sun so it will have a known location. Here's how it might read, assuming the sun is "Light 1" and assuming the panels can rotate only on X:
import poser
import math
scene=poser.Scene()
panel=scene.CurrentActor()
sun=scene.Actor('Light 1')
scene.DrawAll()
pX,pY,pZ=panel.WorldDisplacement()
sX,sY,sZ=sun.WorldDisplacement()
rads=math.atan2( (sY-pY), (sZ-pZ) )
degs=rads * 180/math.pi
xr=panel.ParameterByCode(poser.kParmCodeXROT)
xr.SetValue(degs)
scene.DrawAll()
My python page
My ShareCG freebies
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.
I'm having a bit of trouble figuring out the point-at function.
One thing that isn't really clear is whether object orientation is important, or if it is based on the objects' relationship when point-at is set. I assumed it was based on the z-axis, but when I try to align props they always seem to flip around unpredictably.
Does point at work with limits/can axes be constrained. For example, could I make a turret that pointed at an airplane with movement on just one axis, and then have its guns point at the airplane with movement only on another axis?
I am trying to have an object always point at the sun, but I do not want it to tilt or roll. Is this even possible?