How do I persuade unity to recognise that a mesh has changed shape?
basically I'm trying to stick a box to the surface of a rippling plane
I've stolen the example code for deforming a mesh according to a sine wave but seem to be unable to get a raycast from the box to recognise the changing shape of the plane
I'm recalculating normals and bounds at the end of the mesh deformation script and couldn't see anything in the reference that said "recalculate where all the vertices and stuff are"
Am I missing something? I'm using free unity if that makes a difference
Thanks in advance
Replies
Presumably i could use a lower res mesh collider and apply the ripple to that as well?
Cheers
commander_keen
I have the deformation bit all sorted (didn't post back earlier as I was on my phone and edits are a pain), its getting a raycast to recognise that the mesh has changed that wasn't working out.
ill try lotekk's suggestion a little later - I'll also be looking into simply moving the box according to a kind of global sine wave thingy which i imagine will be a lot faster but will lose me quite a lot of useful information