Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

flight class using native quaternions?

edited November 30 in Codea Craft Posts: 204

@Andrew_Stacey i would like to apply your (and @ignatz’s) Flight class to the craft entity quaternions. I would really appreciate if you could find the time to modify it to be compatible with the new craft framework.

Tagged:

Comments

  • Posts: 310

    Could you link to the code that you want to adapt. There's quite a lot of code that came out of the various discussions with Ignatz at that time. The underlying quaternion extensions have been adapted to the new quat type and can be found on github as the file VecExt.lua. For specifics, it would be useful to know what exactly you are trying to do.

  • Posts: 204

    @LoopSpace in my program i fly a submarine inside a deep sea neutrino telescope.

    I use the Flight class developed by you and ignatz in https://gist.github.com/dermotbalson/8876478

    I could not figure out how to convert the self.y and self.pr rotations of the flight class to the craft.entity.rotation used by codeacraft. Ideally we would need an updated flight class based on the native quaternions and your matExt (or vecExt) class.

    Surely, Codea should fully incorporate your matExt class?

  • Posts: 310

    The latest vecext code (https://github.com/loopspace/Codea-Library-Maths) contains extensions to the native quaternions so that anything written with the old code can be adapted to the new. It's just a matter of replacing the vec4s with quats.

    But it might be easier to start afresh. I wrote the low-level code in that project and Ignatz wrote the higher level stuff, so while I could help with the quaternions, I've no particular insight as to how the Flight class uses them (indeed, Ignatz an I used to - politely - disagree on such matters so it isn't how I would have written it). As you're using craft, maybe starting with clean code would be easier than adapting old stuff.

Sign In or Register to comment.