Skip to content

Conversation

@WeersProductions
Copy link
Contributor

Add support for run-time editing of the mass of nodes of a SoftBody (https://twitter.com/i/status/1102674655872208897). Colours indicate their value.

SoftBody softBody = bSoftBodyTarget.GetCollisionObject() as SoftBody;
MeshFilter meshFilter = bSoftBodyTarget.GetComponent<MeshFilter>();
// Transform trans = bSoftBodyTarget.transform;
Vector3[] vertices = meshFilter.sharedMesh.vertices;
Copy link
Owner

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.

Copy link
Contributor Author

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?

Copy link
Owner

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.

@WeersProductions WeersProductions changed the title Improved editor Improve editor Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants