Oh that...minmay wrote:1. Rotating 180 degrees is not the same thing as flipping.Isaac wrote:If spawning via script, set the desired direction with the facing parameter to the spawn function; if spawning via spawner, position the spawner to point in the intended direction.Eburt wrote:Is there a way to "flip" an object when spawning it? In other words, I want the facing to be the same, but the actual orientation of the mesh to be pointing the opposite direction. An analogy might be the "flip horizontal" or "flip vertical" functions in most image editors (where changing facing would be analogous to rotating 90 degrees).
Thanks for any help anyone can provide.
2. Eburt specifically said that they do not want the facing to change.
The answer is no, you can't. You can rotate models in their asset definiton, and you can rotate the entire GameObject with the various versions of setWorldRotation(), but there is no way to flip anything since that is a change in the actual shape of the mesh; there's a reason "flip" is separated from rotation options in image/model editors. Try to mirror your keyboard around one axis IRL, it's impossible. You would have to make a separate, flipped version of the mesh.
Well... one can open the model from the asset pack, use the gmt, select the root node, then set the scale to -1, and rotate the model 180° along the X axis; but unfortunately, the GMT [version 1] cannot flip the 'surface normals'... which would mean that the outside surface of the model would be its inside ~like an inside-out shirt.
You could save the model as an OBJ file and use another tool [like Blender] to flip the "surface normals" and save the obj file and open it in GMT again, and then save it as .model; and define a copy of the object (with suitable name), and use the new model in the defined object's model component.
It is rather involved, and offhand, I'm not sure about the licensing for the asset pack; technically it's altered, but effectively it's the same model and would be used in a Grimrock mod.
*** Hang on... Re-reading a second time: If you want only to make the model turned around 180°... Then just open it in the GMT, and rotate the root node 180°, and save it. Use that as the model, in the object def.