playMaker

Author Topic: Using Curvy and making a Collider work  (Read 2081 times)

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
Using Curvy and making a Collider work
« on: June 21, 2014, 06:33:18 AM »
Hi,

I am trying to use the Curvy plugin with playmaker and am having some issues with it when I try to put a mesh collider on.

Basically the mesh collider does not seem to work on the mesh path I have created.

I posted on the Curvy forums and Jake replied with the following :

Please try to assign the mesh to the mesh collider after MeshBuilder updates it, then it should work.

I cant work out exactly what this means and he has not been around for a while replying at all. I figured this was something that was done in code at runtime, however was wondering if anyone knew a way of doing it with playmaker?

Cheers,
Jasper.

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
Re: Using Curvy and making a Collider work
« Reply #1 on: June 23, 2014, 07:52:41 AM »
Have not had any replies from this, it seems like the kind of thing that should be really simple but for some reason I cant figure it out.

Anyone got any ideas?

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3998
  • Official Playmaker Support
    • LinkedIn
Re: Using Curvy and making a Collider work
« Reply #2 on: June 23, 2014, 07:21:48 PM »
Jake is saying you need to update the mesh used by the MeshCollider.

To do this in Playmajer:

Make an Object variable of type UnityEngine.Mesh.

Use Get Property to get the mesh property from the MeshFilter. Drag the MeshFilter component into the action panel, select Get Property, then select mesh. Store this in your mesh variable.

Then use Set Property to set the mesh property in the MeshCollider. Drag the MeshCollider component into the action panel, select Set Property, then select mesh and assign it the mesh variable.

This should update the mesh used by the MeshCollider.

jasperPT

  • Full Member
  • ***
  • Posts: 115
  • I am a VFX Animator teaching myself to make games
Re: Using Curvy and making a Collider work
« Reply #3 on: June 24, 2014, 10:54:53 AM »
Thanks for the advice,
This seems to be the right kind of idea, however it still does not work, objects just fall right through the mesh.

What is the best way of attaching a scene to a post, do I just upload the scene directly? Maybe that would help.
« Last Edit: June 24, 2014, 11:00:39 AM by jasperPT »