0
Planned

Vertex offset being affected by gameobject scales

jake 10 years ago updated by Freya Holmér (Developer) 10 years ago 3
So, I'm using your awesome technique for creating the illusion of a spherical world, but I'm confused about the vertex offset. It seems that the vertex offset is affected by the gameobject's scale and its parent scale... I've added a Transform node taking the output of your nodes below and going from World to Local and from Local to World without any luck. I've looked for a node containing scale, or using all possible combinations of the Transform node, and I'm unsure of what to do. Is there a node that exposes the object's scale, or am I using Transform incorrectly?
Tricky one. There will be an object scale node later, but it's not in yet. How does it look when things go wrong?
http://imgur.com/a/fWNTU

Sometimes the models work fine (like Unity's capsules are fine, as are their cylinders), but when some custom meshes get scaled, either by a parent node or the actual geometry's game object, their vertex offsets get scaled as well.

Basically the renderer's blue outlines is where the vertices are supposed to be. The last image shows a capsule compared to a model, the collider's green outline is where it would be with no offset, blue is where it should be with offset, and the model way down there is the scaled guy.
I'm guessing this has to do with parent objects being scaled, or positions not being handled properly in its own scale. Odd issue, I suppose I'm missing a multiplication by a scale factor somewhere! Will look into it :)