Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiRope Disabling
#11
Hey guys,

I have a different problem with disabling/enabling the rope. After 3.2 when the rope component gets deactivated it is still rendered but not simulated. This is my problem, I would like it's mesh to disappear, do I need to roll back to 3.1? I was trying to solve the problem with Obi Particle Renderer component, but it has no effect.

Any tips?
Reply
#12
(11-12-2017, 11:09 AM)DeGenerals Wrote: Hey guys,

I have a different problem with disabling/enabling the rope. After 3.2 when the rope component gets deactivated it is still rendered but not simulated. This is my problem, I would like it's mesh to disappear, do I need to roll back to 3.1? I was trying to solve the problem with Obi Particle Renderer component, but it has no effect.

Any tips?

Hi!

Just disable the MeshRenderer component.

We changed the behavior in 3.2 to make it more consistent with Unity's component-based architecture: Renderer components are in charge of rendering, the ObiRope component is in charge of simulation. So it makes sense to disable simulation by disabling ObiRope, and disable rendering by disabling the MeshRenderer.

Note that if you want to disable both rendering and simulation, it is easier/quicker to just disable the entire GameObject.

cheers,
Reply
#13
Thanks, I've found what was the problem:

ObiRope gameObject MeshFilter component had no mesh connected, although it was provided when constructing the rope. When I reinitialize the rope with this mesh attached, I can disable it by disabling the MeshRenderer.

Thanks again, I'll be sure to post the work when we're finished setting the thing up Sonrisa

EDIT:
This method doesn't work when chain preset is selected, when we spawn chain the MeshFilter component mesh reference is missing, and disabling the MeshRenderer doesn't disable the chain.
Reply