User Tag List

Results 1 to 3 of 3

Thread: How can I always orientate an object towards the camera?

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    187
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    How can I always orientate an object towards the camera?

    Does anyone know how to Always orientate a plane/primitive towards the camera in 3 axis
    Or have an example?

  2. #2
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zetcom's Avatar
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    37
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here's an example. Needs to change some parameters (like camera or primitive type) but should help

    yaw: atan2(x, z)
    pitch: atan2(y, sqr( x pow 2 + z pow 2))
    Attached files Attached files

  3. #3
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    187
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Thanks @zetcom Great Example
    I did end up working this out with Uppernates help
    Though I was trying to draw a 2d icon in 3d space

    (my code could be improved)

    Custom Cylinder Billboard
    * Start of frame
    plane: Set X Angle to 270

    * Always
    plane : Set Y Angle to ATan2(AbsoluteZPosition( "Camera" ) - AbsoluteZPosition( "plane" ), AbsoluteXPosition( "plane" ) - AbsoluteXPosition( "Camera" )) + 90

    Custom Spherical Billboard
    * Always
    plane : Set Y Angle to ATan2(AbsoluteZPosition( "plane" ) - AbsoluteZPosition( "Camera" ), AbsoluteXPosition( "Camera" ) - AbsoluteXPosition( "plane" )) + 270

    * Always
    plane : Set X Angle to ATan2(AbsoluteYPosition( "Camera" ) - AbsoluteYPosition( "plane" ), Sqr(( AbsoluteXPosition( "Camera" ) - AbsoluteXPosition( "plane" ) ) pow 2 + ( AbsoluteZPosition( "Camera" ) - AbsoluteZPosition( "plane" ) ) pow 2)) + 270

Similar Threads

  1. Camera Object
    By Atrox in forum iOS Export Module Version 2.0
    Replies: 7
    Last Post: 22nd May 2012, 08:53 PM
  2. Camera object dev only?
    By Ryan in forum iOS Export Module Version 2.0
    Replies: 4
    Last Post: 1st February 2012, 01:28 AM
  3. Camera object in app preview
    By mikec in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 9th November 2011, 04:38 PM
  4. Camera object
    By Fingerhand in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 28th March 2009, 04:57 PM
  5. Camera Object
    By Novabrain in forum Extension Developers Lobby
    Replies: 3
    Last Post: 6th January 2007, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •