Face the camera script?

ChoppskiChoppski Posts: 441

I know nothing about script writing. But I am making a bunch of billboards and would a script that can make the billboard face the camera. Would that be tought to create?

Post edited by Richard Haseltine on

Comments

  • Richard HaseltineRichard Haseltine Posts: 97,065

    Are yiou intending to write it yourself? If so, see below - if not, please edit your opening post and chnage the forum to Product Suggestions.

    Getting the location of the current viewpoint is fairly simple - you just need to chug through the MainWindow global object to getViewportMgr(), then from that getActiveViewport(), then from that get3DViewport(), then from that getCamera(). Once you have the camera you can get its location from the general DzNode getXPosControl() etc., and getValue() on those. For the billboard(s) you shoudl be able to use Scene.getSelectedNodeList() and plod through them getting their positions as you got the camera position, then you need to do a bit of maths to figure out which way they should face, then use getXRotControl() to get the rotations controls and setValue( number ) on those to set the rotations.

  • ChoppskiChoppski Posts: 441

    I was hoping to create it myself, but everything you wrote is greek to me. that's the problem. I have products that help me, but I toying with selling some billboards I've made, but I can't include a script to make them face the camera. Thanks.

  • MartirillaMartirilla Posts: 173
    edited April 27

    There is the mcjLookAtTheCamera script from 2012. https://www.daz3d.com/forums/discussion/242/ Scroll down this forum thread for a working link to a refined 2019 script in a .ZIP file, "suitable for Genesis 1 to 9". Might be useful re: hacking out a script to also work with 2D billboards. Possible also useful, Poser already has a 'billboard faces the camera script', available free at ShareCG in the Scripts section.

    Post edited by Martirilla on
Sign In or Register to comment.