Hi Rick,
Quote: "
1) CloneObject() apparently *doesn't* copy objects that were linked using FixObjectToObject() .
Question: Is there a command that does do this?
"
No - and probably never should with manually fixed objects
The usual idea is that animated / boned / multi child objects would have a default rest "rig" which is fairly easy to instantiate from a simple create() function, which clones/instances and "rigs" whatever parts are needed.
This way you start of with a generic "thing" maybe in your case without a gun or without a hat.. etc. which you then customise after doing the generic create() function.
It may seem a pain to add all the bits and maybe setup pivots and other things, but you only need to do it once and suddenly it's really flexible.
Cloning object collections should have worked on objects loaded with LoadObjectWithChildren(), but I think that's still broken.
I did a lot of work with this sort of thing on
this project so I've probably been through a lot of things you are experiencing!
Quote: "2) The original orientation of a cylinder is vertical, so in order to shoot I had to rotate this object, but doing so doesn't change the original x, y, z angles permanently, so it messes up the shooting routing that was initially using spheres, which worked pretty well at first. Now I have to adjust the control routines, from moving into Z direction into Y direction?
Question: This doesn' t make sense as a solution. Is there a way to change the orientation of an manually(procedurally) created object permanently?
"
As per the above method where you "rig" your objects to make a new collection all jointed together and what-not, you can also use this process to reset pivots and rotations.
If you want the cylinder to be rotated according to your gun position, but still have Z as your relative forward/backward direction, then the same "fixing" commands you use to assemble your character will do the job.
Something like: (untested)
a=CloneObject(MasterCylinderObj)
SetObjectPosition(a,0,0,0) // ensure object is reset
SetObjectRotation(a,0,0,0)
RotateObjectLocalY(a,90)
FixObjectPivot(a)
FixObjectToObject(a,Hand)
You can extend this idea to reposition the pivot point as well.