Results 1 to 2 of 2

Thread: Getting world rotations...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,649

    Getting world rotations...

    In LScript, you were able to grab an item's world rotations using a simple function, which was part of the object agent...

    For a bone, that would have been <bone>.getWorldRotation(time)

    Now, I'm trying to do the same thing with the Python SDK, which doesn't have that nicety.
    I'm currently reading the Right, Up and Forward vectors using lwsdk.LWItemInfo().param(item_id, param, time). However, I'm probably missing something obvious here.
    I'm not using any strange rotation orders, everything is bog standard HPB rotations.

    Anyone care to give me a nudge in the right direction?
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  2. #2
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    4,208
    Normalize right up and forward vectors to get 3x3 rotation matrix,
    then convert to hpb angles.
    May be this could help,
    https://www.learnopencv.com/rotation...-euler-angles/

    Denis.

Bookmarks

Posting Permissions

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