Forum

This forum is for swapping tips or ideas with fellow users, suggesting new features, or showing of what you have created with the system etc, there is no guarantee of an answer to questions posted in the forum. All support questions must be submitted via the Support ticket system

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: Mesh modification while megafier is applied
KaeR
Newbie
Posts: 13
Permalink
Post Mesh modification while megafier is applied
on: September 11, 2013, 23:04
Quote

Hi,

I am trying to deform an object by simply moving some of its vertices via scripting. However, there is one of the megefiers attached to the object as well. At runtime, the megafier does not work. It works only when there is no script that modifies the position of verticies attached. Both actions i.e. changing parameters of the megafier and vertices manipulation do not need to happen at the same frame.

Basically, we use the megafiers to expose the object and then we want deform using our script and then hide it if the conditions are met. When it becomes exposed its shape change that is why we would like to use megifiers in addition to our script.

Any ideas?

Thank you.

spookycat
Administrator
Posts: 148
Permalink
Post Re: Mesh modification while megafier is applied
on: September 11, 2013, 23:16
Quote

Hi There
It is a limitation of Unity that only one update to a mesh can be sent per frame. Can you post the code for what you are doing? Usually if you want to deform the mesh further you would add your own modifier to the system, there is an example on the website for adding your own deformation, if you can show the code and what it is you are trying to do then I can see better how to help.
Chris

KaeR
Newbie
Posts: 13
Permalink
Post Re: Mesh modification while megafier is applied
on: September 12, 2013, 17:31
Quote

Thank you for a prompt answer. I didn't think about making a mod. It may be a good idea. I will try to test it and if something doesn't work I will post that code here. The other piece of code is in JS so I would need to convert it.

Edit:
Since it may take me a while to figure out how to make a mod of the other piece of code i post it here https://docs.google.com/file/d/0B394KG_oHPBHeTdsVDI1X2pzVlE/edit?usp=sharing.

The main action of that script happens in Deform(Collision collision) where indentation in the mesh is made based on the collision with another object.

Any feedback will be appreciated.

spookycat
Administrator
Posts: 148
Permalink
Post Re: Mesh modification while megafier is applied
on: September 12, 2013, 23:02
Quote

I will take a look at the code and see if I can get it added as a modifier.

spookycat
Administrator
Posts: 148
Permalink
Post Re: Mesh modification while megafier is applied
on: September 16, 2013, 22:02
Quote

I have added your code as a modifier, it seems to work but if you could maybe email me an example of the types of meshes you would be using along with a hardness map I can do some proper testing.

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.02 seconds.