Jump to content

Vamidi

Members
  • Content Count

    4
  • Joined

  • Last visited

  1. @lucid I don't know if I should start a new topic, but what do you need to keep in mind when these variables are set to false --> bool EditorSettings::reverseYOnLoad = false; bool EditorSettings::reversePivotYOnLoad = false; bool EditorSettings::reverseAngleOnLoad = false; because in mine opengl app I have it reversed. Also I am not that great in math, so I dont see what I need to add or decrease to rotate the objects right. I tried to set the variable to false as well in the spriterplusplus example and that is the exact result that I get in mine opengl application.
  2. Alright I finally understand what is happening in Spriter sfml version. So basically you have bone_refs and sprite objects. the bones control the images. in order to make it relative to each other you need to calculate all the bones first. When those are caculated you add those values to the sprite object. this will get a sprite position, scale, rotation basically and those values needs to be calculated again to get the right matrix. --> So basically get the rotation in radians, then rotate and scale it (that is what sfml also does). Multiply the calculated sprite position with the rot
  3. So if you would only have the loading part implemented which only contains spriterefs, entityrefs and boneref will this still apply? (I removed everything else because of the amount of classes and having my own transformation class) so would you have the same indices for the parent, so for example we take your example and take each bone ref with the parent id. then when I build the matrix I should grab the parentid (and search) and apply those transformations to get it on the right place? Do I understand it correctly?
  4. Hi everyone I am tryng to render Spriter images with Opengl. I am using glm as a library to place the object on screen. However if I just take the first zorder and render it with glm by doing it with this code // Prepare transformations Matrix4 model = glm::mat4(1.0f); // Translate to center model = glm::translate(model, Vector3(parentPos, 0.0f)); float deg = pObjectInfo->GetAngleInfo().fAngle;
×
×
  • Create New...