Hello,
Does it make sense that when I attach a Sphere (I didn’t check other geometries yet) to a DAC linked joint (in this case “Joint12” of the Ninja model), it scales down until you cant even see it. see it happening in the attached video.
I’m not 100% percent sure but I think it is a regression from previous version of Minie…
WDYT?
OK, I managed to reproduce the issue. What happening is that the collision shape stays in the original size but the geometry itself scales down. here is the source test code:
It worked fine in the past so I think it is related to some upgrade I have recently made. Maybe Minie 2.x.x but I;'m not sure… need to check.
*Edit: I downgraded Minie to 2.0.0, 1.7.0, 1.6.0, and it still happens so probably not a Minie issue
I’m attaching the sphere to Ninja’s Joint12 - world scale = 0.02,0.02,0.02
So the Joint’s world scale will affect any geometry attached to it ? in my case scaling the sphere to 0.02,0.02,0.02? this is by design?
So in order to preserve original size of the attached object, I need to be aware of the scaling of the object I’m attaching to, compensate that by scaling the attached object and change scale again when detached and return to root node - right?
I’ll do that. Thanks!
Let me see if I understand what you are suggesting - create a new node, attach my Sphere to that node and then attach this node to the Ninja’s joint, right? this will preserve the original scale of the Sphere?
What does it mean “unscale”?
I updated the test code to have a tmp Node holding the Sphere then attached the tmp Node to the Joint. here is the full function code:
That I understand. What confused me was the motivation of adding a parent node to the Sphere. I thought it will make some kind of magic / short-cut for preserving the original scale of the Sphere. If I need to scale & Unscale the Node then I can do it directly on the Sphere hence the confusion.
Maybe there is a performance gain using the parent Node technique… Don’t know.
I understand how to fix my problem. Thanks!
You add the unscale node so that you don’t have to unscale your item just to add it… and then you don’t have to remember how to unscale it when you remove it (because maybe the item already had its own scale).
The idea is that you can setup your model in one place and keep track of the new attachment unscaled nodes… then you don’t need to remember that this model is 0.02 and this one is 0.4 and that one is 1.0, etc. You just attach and unattach as needed.