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: Issue with Megafier morph modifier
DogBox
Newbie
Posts: 5
Permalink
Post Issue with Megafier morph modifier
on: May 10, 2012, 22:52
Quote

Hi,
I'm using MegaMorph to deform a mesh in runtime using "morph.SetPercent(0, 100);" and I detect two issues :

1) Most of the time, the morph.SerPercent() just dont modify the channel percent value... And sometimes, it works very well...

2) When the morph.SetPercent() works, the prefab mesh is modify too so if I instantiate again the same model from the prefab, the second one is deform too...
I was thinking the morph class only deform the current Gameobject mesh and not the prefab model mesh...

How can I reset the morph on the prefab or how can I avoid my prefab from being affected ?

Could you help me please ?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Issue with Megafier morph modifier
on: May 11, 2012, 01:16
Quote

Hi There
I am sorry to say the Unity Prefab stuff will just not work with meshes that are modified, this is a limitation of the Unity system, they just didn't expect meshes to change between prefabs. I have included in the system a Copy Object script to allow you to make a new version of a modified object which will work, you can also call the copy methods from script if you wish to have multiple versions on an object in the scene and then deform it independently. You can find the option to copy an object in the GameObject menu.

The morph percent will work fine on meshes if the copy object method is used or there is only one of the object in the scene, if you were using prefabs then the morph values were fighting with one another as to what to use. Hopefully Unity will improve their prefab system to work with meshes that can be altered but until then the Copy Object system is the only work around.
Chris

DogBox
Newbie
Posts: 5
Permalink
Post Re: Issue with Megafier morph modifier
on: May 11, 2012, 08:51
Quote

HI ! Thanks for your fast answer !

I try to generate my morph model using "MegaCopyObject.DoCopyObjects(target);" where the target is an instantiate GameObject.
I deform it with "morph.SetPercent(0, 100);" but it still affect the prefab :/

Maybe I did something wrong ?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Issue with Megafier morph modifier
on: May 11, 2012, 10:12
Quote

Hi Again
I have just looked into this and there was an issue in the system, it did a copy but the system serialization code I have for copying components isn't quite whats needed for duplicating the morph channel data. I have spent the morning fixing this problem and will be submitting a new version to the store today. Thank you for finding that issue.
Chris

DogBox
Newbie
Posts: 5
Permalink
Post Re: Issue with Megafier morph modifier
on: May 11, 2012, 21:52
Quote

Hi again ^^

I update the project but I didn't notice any change on the MegaCopyObject 😛

I didn't notice any other bug on the prefab ! I think it is fixed !

Thanks a lot for your fast replies !

spookycat
Administrator
Posts: 148
Permalink
Post Re: Issue with Megafier morph modifier
on: May 11, 2012, 22:43
Quote

Do you have version 1.91, I tested it with the morph pipe in the scene and the old 1.90 copied but the percent values were linked on both version but 1.91 you can copy and everything is fine.
Chris

DogBox
Newbie
Posts: 5
Permalink
Post Re: Issue with Megafier morph modifier
on: May 11, 2012, 23:18
Quote

Hummm finally, it is always bugged :/

I have the last asset store version. Where can I read the version number ?

spookycat
Administrator
Posts: 148
Permalink
Post Re: Issue with Megafier morph modifier
on: May 12, 2012, 09:48
Quote

If the asset store doesn't show that there is a new version in your list of assets then that will be the latest version.
I tried the copy object again on another morph and it is working OK here, would it be possible for you to email me a simple test scene so I can see what is different and figure out what is going on?
Chris

DogBox
Newbie
Posts: 5
Permalink
Post Re: Issue with Megafier morph modifier
on: May 14, 2012, 10:46
Quote

My project is really heavy and I have not the time actually to build a new simple test scene, I'm sorry.
I could try to explain to you how I have the issue.
In my game, I instantiate prefabs object the player have to shoot.
Each time the player get a combo, I use your script to make a copy of the actual ennemi and I zoom on him. Each time the player hit him, I use your morph script to deform him.
After a delay, I destroy the copy object.
Ennemis continue to spawn and all ennemies which come from the same prefab as the deform one are deform in the same position as the last combo hit.
So I only use the morph.SetPercent(0, 100) function on copy object created from MegaCopyObject.DoCopyObjects(target).
But finally, my prefab is modified and all the other instances of the prefabs are deformed too.

I will try later to create a simple test scene.

I hope you understand my bad english ^^

spookycat
Administrator
Posts: 148
Permalink
Post Re: Issue with Megafier morph modifier
on: May 14, 2012, 10:57
Quote

Hi Again
Well it sounds like that should work, so maybe it is an issue that the object being copied has come from a prefab, if you could do a simple test scene then that would be great.
Chris

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