Define , drag vertex on cube in .js?(Modelling in Unity3D)

I want to make script which is used for modelling or designing smth. Like 3Dmax , when i create cube in 3Dmax , i can drag the corner of cube. i mean that i want to make modelling in Unity3D like 3Dmax. Is it possible? Do you have any code (C# or js)? Also i need some suggestions or examples of you…

there is more specifically explain. Here this video

Any answer i will be apriciate :slight_smile:

Really not sure why you’d want to do this, but if you must then you’re going to need to know the mesh interface inside out:

I did an open-source small friday project on something similar a while ago, if you’d like to collaborate on it, that’d be groovy:

http://angryant.com/general/tipsandtricks/faff-cleanup-sketch/

AnryAnt i downloaded your project but give me this error:

Did you try following the suggestion and committing the fix?

i downloaded it and there is no sketch cube in

i just downloaded it and opened as a new project.

Are there any remaining error messages in the console?

it only gives 2 errors on console after clearing.

Thats all…

So why not try doing what the error message suggests?

i changed it :

if (Physics.Raycast (Event.current.mouseRay.origin, Event.current.mouseRay.direction, out hitInfo))
//after changing
if (Physics.Raycast (Event.current.mousePoisition, Event.current.mousePosition, out hitInfo))

and gived another error during prefab cube on scene…

And there is still no Sketch Cube in the menu…

That error means that somewhere there’s a Begin[something] call which is not matched by an End[something] call.

How can i handle it?

Well you could skim the code and see if there is an obvious call missing somewhere. Other than that, you could sprinkle around Debug.Log messages around your start and end calls - to notice if an end call is sometimes not being executed, when its matching start call has been.

So why the menu does not include Sketch Cube when i open the AngryAnt-Sketch-565e47c as a project.

That usually happens because there are unresolved scripting errors.

Did you solve the Begin/End issue?

No i haven’t managed to solve it yet :frowning:

i find this it worked but i want to modify with mouse

So maybe your initial question wasn’t really accurate? Are you looking to write a script that does this or are you looking for an already written script?

Both of them :slight_smile: