Polybrush prefab brush paints at random coordinates on the mesh, I'm painting on a low-poly mesh and when i paint prefabs I can see the brush displaying correctly and on the hierarchy new clone get created, but not in the scene. after sercing for some time i found that they are randomly generating on the surface of the mesh. using unity 2018.2.3 personal, on the screenshot i'm clicking the right button of the mouse and you can see some prefabs near the generated near the coordinate. thanks in advance!
Hey, @gabrielw_unity I'm still seeing this issue in polybrush 1.0.1, are there any work arounds available? Guessing it has something to do with scaled meshes?
Well... found a hacky fix for now, the issue is with the brush settings radius being applied on the verts in local space when it's shown in editor in world space (as well as most likely desired to be defined in world space if you want a consistent radius across objects). If anybody else has this problem, either reduce your brush radius or you can make the beginning of the function "PlaceGameObject" in BrushModePrefab.cs look like this: Code (CSharp): void PlaceGameObject(PolyRaycastHit hit, PrefabAndSettings prefabAndSettings, BrushTarget target, BrushSettings settings) { if(prefabAndSettings == null) return; GameObject prefab = prefabAndSettings.gameObject; Vector3 worldScale = target.gameObject.transform.lossyScale; float avgScale = (worldScale.x+worldScale.y+worldScale.z)/3f; Ray ray = RandomRay(hit.position, hit.normal, settings.radius/avgScale, settings.falloff, settings.falloffCurve); (also since it's now in package manager you'll need to copy the package from packagecache to the packages folder to get the changes to stick)