How to change the center of an object?
I have a mod that adds ring to game. It was originally made for MP female character however I just converted it to game object (from .ydd to .ydr file) (huge thanks to Agent Smith by the by ).
So I'm attaching that object to my addon ped using Menyoo's Object Spooner. However the problem is the center of the ring is not properly set. So when I change it's Pitch, Roll, Yaw angles, instead of turning around it's own real axis, it's turning around a center that is quite far away from it.
Here you can see the ring's position and the position of it's center shown in Menyoo.
and in here, you can see it's turning around that center which is far away from it, instead of turning around it's own axis (or the axis that was supposed to be better said).
and this problem makes it very very difficult to properly adjust the ring's position and angle to the finger. Addition to that, once you do the attachment, the ring's position changing and it's X,Y,Z,Pitch,Roll,Yaw values are being determined based on which body part you attach the object. (For example in Manual Placement X value moves the object left and right, Y value forward-backward and Z value up&down. but once you attach, the X value moving up&down instead, Y left-right, Z forward-backward... and so does the Pitch, Roll, Yaw are also changing, which they are even harder to properly position )
So basically while it's already difficult to properly set the Pitch, Roll and Yaw values after the attachment, this wrongly placed center makes it a lot lot more difficult
So far I changed the object's Center, Radius, bbMin and bbMax values to 0.000 in both .odr and .mesh file (mesh file only has bbMin and bbMax ). However the center still same Any way I can change the center to where it should be?
Many thanks in advance
Why not attach it to the ped first, hard to understand from pic since there isn't any finger.
@JohnFromGWN It's being even worse after I attach it The finger not the real problem though, the problem is I can't properly turn it
If you wish though I can record a video of how it's being
@Aurora11 sure, we might try a simple script solution which we can load as text.
As far as I know, you would have to change the pivot point in 3ds max. At least that's how I would do it to get it centered.
Here is a video I made awhile ago to help explain to someone on discord why their object wasn't placing and rotating properly. Hopefully it would make sense to you if you watched the whole thing and if you've used 3ds max before.
I don't speak in it, but i still got the point across to the person I was originally helping.
The problem was they would always move just the mesh instead of placing the object by having the main mesh modifier selected, so when they exported the object the pivots would be messed up. You'll see what I'm talking about here in the video. It's what you are describing as your issue.
Oh, and having the center, radius, bbmin and bbmax at zero will almost certainly cause you issues.
@JohnFromGWN So, this is how it's acting like. You can also see it's turning very weirdly after attaching the ped so making it very difficult to adjust it's angle properly
But this one for example Scuba Gear, I converted it from Mikey's accessory (vanilla accessory), it's turning around it's own axis without changing it's position.
@chonkie Thank you so so much for the explanation video It's really looking nicey and educating I don't have 3ds max unfortunately but perhaps I can get a license as student I will try at least
@Aurora11 You might be able to find someone to fix it for you on discord. If I still had 3ds max I would do it for you. It should be like an easy 5 minute fix.
@chonkie Thank you so so much
Agent Smith in the forum kindly wanted to help me out with this. He fixed the pivot point, not the ring is turning around it's own axis, however we encountered a different problem this time. The ring disappears at one side. Lemme show you the video;
Do you have any idea why that would be happening by any chance?
@Aurora11 Only thing I can think of off the top of my head would be if you still have the stuff like the bbmin and bbmax and other things set to zero. I know having too small of a bounding box will cause items to flicker or disappear at certain angles.
@chonkie Nope I set the bbmin and max in both ydr and ytyp files correctly back again
@Aurora11 How did you figure out what to set the numbers to? Did you just use the numbers that were there before the pivot was centered? If so, those numbers could be wrong since they were for when the pivot wasn't in the center of the ring. Do you have CodeWalker? You can see what the bounding box is if you bring up the prop in CW.
Here's two pics in CW as examples of when the program in 3ds max was making the wrong calculations for the bounding box and after I corrected the numbers. The green box is the bbmin and bbmax or the bounding box.
There's a mod tool by skylumz i think it ytyp creator or named something like that and it can do the calculations of the numbers.
If it isn't incorrect numbers for bscenter, radius, bbmin, bbmax causing the ring to disappear, then I don't know what else it could be. That has been the issue every single time I've had an object flicker or disappear.
@chonkie I checked but the bounding box looks ok in CW.
This is the previous look;
and this one is the new look;
Also it's disappearing in codewalker as well when I rotate it to the other side