-
Notifications
You must be signed in to change notification settings - Fork 145
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
Improve editor #54
base: master
Are you sure you want to change the base?
Improve editor #54
Conversation
Scripts/Editor/BSoftBodyEditor.cs
Outdated
SoftBody softBody = bSoftBodyTarget.GetCollisionObject() as SoftBody; | ||
MeshFilter meshFilter = bSoftBodyTarget.GetComponent<MeshFilter>(); | ||
// Transform trans = bSoftBodyTarget.transform; | ||
Vector3[] vertices = meshFilter.sharedMesh.vertices; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks cool!
Can the vertices of the shared mesh be cached? Getting the vertices every editor frame update will generate a fair bit of garbage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's definitely a good idea, but I am actually not using the vertices at all! I was thinking about using them, but I'm using the nodes instead.
Do you have any suggestions on other properties that should be available in the editor view?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there some stiffness properties that could be edited this way? That would make adjusting the properties very intuitive.
Add support for run-time editing of the mass of nodes of a SoftBody (https://twitter.com/i/status/1102674655872208897). Colours indicate their value.