[About macOS Ventura 13.0] (12/20/2022)
The currently released Live2D Cubism SDK is not guaranteed to work with macOS Ventura.
Please refrain from upgrading the macOS as they may not work properly.
The Cubism Editor license file may be lost after the macOS upgrade.
Please make sure to deactivate the Cubism Editor license before upgrading the macOS.
For more details[NOTICE]
About the support for Mac models
Cubism Editor is not supported with Apple M1 processors.
Please refer to
System Requirements for details.
We will not respond to any related inquiries with this message.
Multiple models when using TranslateRelative()
When selecting only one model and translate it like this:
modelToUse->GetModelMatrix()->TranslateRelative(speed,0);
but when i have multiple models on the scene they move instead of only the selected one
(for example: if model number 1 is selected models 2 and 3 will Translate too).
0 ·
Answers
Thank you for reaching out.
Could you tell me how you are implementing the display of multiple models?
If you are using one ModelMatrix for each model, make sure that you have an instance for each model and see if the same problem occurs.
by adding a new instance to _models.
Example code:
_models.PushBack(new LAppModel());
_models[_models.GetSize()-1]->LoadAssets(modelPath1.c_str(), modelJsonName1.c_str());
is there any way other then this?.
From what I understand there is a ModelMatrix for each model instance in _models
what did you mean by "If you are using one ModelMatrix for each model"
is there a way to use multiple models with one ModelMatrix? what are the benefits
of doing so?
Thanks for the answer.
The process you provided is correct.
I rewrote CubismLAppManager::ChangeScene() in the SDK sample here as follows and confirmed the operation. When I ran this, only the second model moved its position.(See the attached image)
Could you please check if the problem still occurs when you perform the same process?
2. I wrote a method for translating the first model when the user click the screen
it is a simple method with only one line:
_models[0]->GetModelMatrix()->TranslateRelative(speed, 0.0f);
but when i start it both models translate and that is my main problem
for example using this line after both models were created:
_models[0]->GetModelMatrix()->TranslateRelative(0.7f, 0.0f);
Thank you for your answer.
I was able to confirm the phenomenon.
We are going to investigate the cause of the problem, so please wait for a while.
I tested the code and everything seems to work fine
P.S. the last comment with the code disappeared for me can you write it again
for future reference.
I found out that the reason is that the instance of CubismMatrix44 used for drawing is not being reset after each loop process.
This can be avoided by rewriting a part of LAppLive2DManager::OnUpdate() as follows
void LAppLive2DManager::OnUpdate() const
{
...
// CubismMatrix44 projection;
csmUint32 modelCount = _models.GetSize();
for (csmUint32 i = 0; i < modelCount; ++i)
{
CubismMatrix44 projection;
...
This fix will be added in a future update of the SDK.
Thanks for the report.