sketchucation logo sketchucation
    • Login
    1. Home
    2. lachlan
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    lachlan

    @lachlan

    10
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online
    Age 34

    lachlan Unfollow Follow
    registered-users

    Latest posts made by lachlan

    • RE: Render application Home pages

      It would be nice if each renderer entry showed whether or not it's free.

      posted in Gallery
      L
      lachlan
    • RE: Get the global rotation of a DC

      Thanks for the help, it makes sense, but it doesn't solve my problem entirely.

      I think I'll have to explain the scenario.
      I'm making a level editor for a game (SU has easy 3D nav and editing + good exporting via ruby).
      The game rotates its objects in the order x,z,y unlike SU's x,y,z.
      In addition, all z rotations are "global". I'll give an example.
      If an arrow pointing north (0,0,0) is rotated to have x=45 y=0 and z=180 then in the game it will be pointing south, but upwards at 45 deg, whereas SU will have the arrow pointing down.
      The game rotates objects through the global z axis (always vertical), not the objects z axis.

      I'd like to know how to get rotations that can be used in the game.

      Thankyou

      posted in Dynamic Components
      L
      lachlan
    • Get the global rotation of a DC

      As the title suggests, how do I get the global rotation of a DC?

      For example:

      • Make a simple DC cube
      • Rotate it 45 deg left on z (using the move tool)
      • Then 45 deg up on x (also using the move tool)
      • look at the rotation values in the DC Attibutes

      The values should be [35,-30,-36]

      I know that SketchUp uses local rotation values.
      I'm creating a specialised exporter and need to know the DC's global rotation of [45,0,-45]

      Is there some mathematical way to do it? Or even better, an inbuilt ruby command?

      Thanks

      posted in Dynamic Components sketchup
      L
      lachlan