Obi Official Forum
I'm reporting a bug. - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: I'm reporting a bug. (/thread-4388.html)



I'm reporting a bug. - twocomet - 17-10-2024

[attachment=2220]
In the case of this mesh, it is rotated on the floor from the beginning.

[attachment=2221]
If you rotate it, it returns to normal.

[attachment=2222]
The selection function works fine.

[attachment=2223]
Now we go into painting mode to edit the mass.

[attachment=2224]
Painting can never be done on a standing area.
Painting is only possible on empty spaces where they lie before being rotated.


RE: I'm reporting a bug. - josemendez - 17-10-2024

Hi!

Thanks for reporting this! could reproduce the issue, will share a patch as soon as possible.

kind regards,


RE: I'm reporting a bug. - josemendez - 17-10-2024

Open up ObiPaintBrushEditorTool.cs. At the very end of the file (near line 117) you'll find this method:

Code:
public override void OnSceneGUI(SceneView view)
        {
            if (Camera.current != null)
            {
                paintBrush.raycastTarget = meshBasedEditor.sourceMesh;
                paintBrush.DoBrush(editor.blueprint.positions);
            }
        }

Modify it by adding the following two lines, like so:

Code:
public override void OnSceneGUI(SceneView view)
        {
            if (Camera.current != null)
            {
                // Add these lines:
                var blueprint = meshBasedEditor.blueprint as ObiMeshBasedActorBlueprint;
                paintBrush.raycastTransform = blueprint != null ? Matrix4x4.TRS(Vector3.zero, blueprint.rotation, blueprint.scale) : Matrix4x4.identity;

                paintBrush.raycastTarget = meshBasedEditor.sourceMesh;
                paintBrush.DoBrush(editor.blueprint.positions);
            }
        }

That should fix the problem.

Let me know if I can be of further help,

kind regards