-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange model angle #27
Comments
When you write combining, do you mean setParent()? |
Yes, I use setParent() to add model to attachment for (const config of [wing, helmet, jewelry]) {
if (config) {
const { modelName, location } = config;
const attachment = attachments.find(attachment => attachment.name === location);
if (attachment) {
const attachModel = await model.viewer.load(`${modelName}.mdx`, pathSolver).whenLoaded();
const attachInstance = attachModel.addInstance();
attachInstance.setSequenceLoopMode(2);
attachInstance.dontInheritScale = false;
attachInstance.setParent(instance.nodes[attachment.objectId]);
scene.addInstance(attachInstance);
attachInstance.setSequence(
attachModel.sequences.findIndex(seq => seq.name.toLowerCase().includes('stand')) || 0
);
}
}
} It's not easy to describe it. Sorry, Here is the project that i use to test. |
Not sure if it's legal to share some of the files in that zip :P No one really ever tested attachments other than me when implementing them, or the unit test which is very simple, so it's likely it is bugged in some way or another. On a side note, I noticed you require fengari. Are you doing with it something related to wc3? :) |
No, I try to build this project with version4.7.7 but it's seems to missing some dependencies like fengari and child_process. I added them but still not work. So, i change to use version4.7.6. |
Ah, maybe I added some leftovers by mistake, still not sure how I am going to incorporate that stuff in. I guess it's getting time to allow parts of the library to be optional, but I am not sure how. That being said, I just checked and didn't see anything I committed by mistake, odd. |
- Added also per-instance culling for updates, for instances inside the visible cells. The cost of it is meager next to the savings it gives when viewing maps. That being said, it doesn't support per-instance culling for rendering, need to think more for that. - MDX billboarded nodes now have the correct orientation, check with #27.
For some reason I was thinking this whole time that npm keeps in sync with github. I guess that's not the case, and thus I suppose I kept putting my local experimental stuff in npm by mistake, hence that fengari import. Either way, this should be fixed now, check it please on your side. |
Yes, build success after 4.8.0. // change the model name
render(<MdxViewer name="Gilgamesh.mdx" />, document.querySelector('#root')); On 'Hakuman.mdx' the 18th wing not follow the model, and 'LibGirl.mdx' not show the penultimate seventh wing. Hakuman.mdx |
I meant that the orientation issues with billboarding should be fixed. Did you check them? |
Yes, it fix. Orientation now is normal width all of the models that i test. For wings, only Hakuman.mdx and LibGirl.mdx |
Hakuman seems to work correctly - when you use the chest attachment, the wings don't move, because the chest attachment never moves. |
|
Ah you are right, I forgot to commit the webpack config file. Are the other issues solved though? :P |
Yes, all solved :) |
Some model angles are incorrect when combining models
Real behavior
Use viewer
Hat
The text was updated successfully, but these errors were encountered: