Skip to content
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

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from

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