Search code examples
unity-game-enginemeshsteamhtc-vivevrtk

Game mesh goes crazy


I have experienced a strange issue where my gameobject meshes go crazy upon picking them up. It's only for specific meshes for which some of them only do it randomly. By crazy I mean they resize in a certain axis.

I am using the HTC Vive, SteamVR, and VRTK.

The only thing that I changed was update a graphics driver, but everything else seems to be fine. Here is a link to my game on GitHub;

https://github.com/Tishbyte/CS-Tour

To reproduce follow these steps;

  1. Turn on the game from the main scene using the HTC Vive.

  2. Travel to a room with a whiteboard, these can identified by the markers which having glowing tips.

  3. Pick up the marker and you shall see that the mesh goes crazy. This can also be done randomly with the blue and black chairs if you throw the object.

Any help would be appreciated.


Solution

  • I found that the child objects had a certain scale that was modified when it was interacted with by other objects. Not sure why this happens, but it has something to do with the parent object having less than a scale of 1. I fixed the bug by placing all the buggy child objects into a separate gameobject with a scale of one on x, y, and z.