Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

[Solved]PolyBrush displace from a position?

Discussion in 'World Building' started by cherub, Aug 6, 2019.

  1. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    494
    Hi, I would like to use polybrush to work on a sphere but want to displace from center or vector3(0,0,0)
    only options i see are planar or vertex normal.

    is it possible? if not i could put that in myself but dont know where to look.
    Or maybe there is another tool for this?
     
  2. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    494
    in case anyone cares change line 99 in z_BrushModeRaiseLower.cs to:
    n = hit.position - new Vector3(0,0,0);//normalLookup[index];
     
  3. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    712
    Thanks for sharing your solution! If you have time, it'd be interesting to see some images/video of the result, might help others, and maybe it's something we should consider adding as an option? Thanks!
     
    Last edited: Aug 8, 2019
  4. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    494
    Cool! would be great to have this as an option or maybe be able to assign a position to displace from?
    ill be sure and post some pics when we r ready.

    Looks like we are gonne be using this tool quite a bit. you guys want feedback?
     
    Last edited: Aug 7, 2019
  5. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    712
    Thanks! Feedback is always great, definitely :)
     
  6. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    494
    Getting these warnings in v: 2019.1.10f1


    Code (CSharp):
    1. Assets/ProCore/Polybrush/Code/Editor/Brush Modes/z_BrushModePrefab.cs(249,23): warning CS0618: 'PrefabUtility.ConnectGameObjectToPrefab(GameObject, GameObject)' is obsolete: 'Use RevertPrefabInstance. Prefabs instances can no longer be connected to Prefab Assets they are not an instance of to begin with.'
    2.  
    3. Assets/ProCore/Polybrush/Code/Editor/Interface/z_Editor.cs(224,4): warning CS0618: 'SceneView.onSceneGUIDelegate' is obsolete: 'onSceneGUIDelegate has been deprecated. Use duringSceneGui instead.'
    4.  
    5. Assets/ProCore/Polybrush/Code/Editor/Interface/z_Editor.cs(225,4): warning CS0618: 'SceneView.onSceneGUIDelegate' is obsolete: 'onSceneGUIDelegate has been deprecated. Use duringSceneGui instead.'
    6.  
    7. Assets/ProCore/Polybrush/Code/Editor/Interface/z_Editor.cs(246,4): warning CS0618: 'SceneView.onSceneGUIDelegate' is obsolete: 'onSceneGUIDelegate has been deprecated. Use duringSceneGui instead.'
     
  7. cherub

    cherub

    Joined:
    Apr 26, 2006
    Posts:
    494
    looks like a good bit of depreciated code is being used. seeing this spam:

    Failed to find method GradientField in type UnityEditor.EditorGUILayout
    UnityEngine.Debug:LogWarning(Object)
     
unityunity