Skip to main content

Search

How do i get a consistent axis rotation value?

  • TAPgiles

    I finally figured it out!!

    https://indreams.me/element/oHsfmbATcxy

    The basic idea is... actually rather complicated:
    - Use the camera transform to emit an object at the same position and orientation as the current view.
    - On that object, have 2 tags: one at the centre and one further out. Subtract the outer position from the centre position to get the "direction" it is facing.
    - Use a second object with a "look at" rotator and tell it what direction to face, *after* splitting and recombining to only use the X and Z component of the direction. This means it won't try to look up/down.
    - Use an angle sensor on that object to find out what Y rotation it has.

    But it's all in that linked logic piece anyway. Hope this helps. ^^

  • TAPgiles

    I think I linked the wrong one... here's the actual compass chip: https://indreams.me/element/ocqSiVTvTbX

Please sign in to leave a comment.