1
\$\begingroup\$

I'm working on something where the same graphics mesh is rendered multiple times in the scene. The problem with this is that each of those graphics items have a physics mesh which isn't there in the manually drawn meshes...

I've looks for something in the Physics and Collider documentation but haven't found anything which does what DrawMesh does for physics meshes. Is there something for this? or will I have to just create a bunch of physics objects manually?

\$\endgroup\$
4
  • \$\begingroup\$ Is there a reason to not use GameObjects for each mesh? Unity does do automatic batching when possible. \$\endgroup\$ Commented Dec 15, 2018 at 20:42
  • \$\begingroup\$ It does batch them but there are hundreds and I don't want to manage them. Placing them in the scene takes a while. They are identical copies of each other just in different locations so if I can get them to all trigger their behaviour in the same way then it saves me a bit of hassle making A duplicate an action in B, C, D, etc. \$\endgroup\$ Commented Dec 16, 2018 at 2:04
  • \$\begingroup\$ Is there a reason you can’t create the GameObjects from a prefab in the scene at runtime, just once in Start(), rather than draw them every frame in update? I don’t think there’s a way to do what you want to do that’s going to be simpler than having a bunch of GameObjects anyway. \$\endgroup\$ Commented Dec 16, 2018 at 15:30
  • \$\begingroup\$ Thats basically what I've ended up doing now but I'm not really happy about it because of all the syncing :( \$\endgroup\$ Commented Dec 17, 2018 at 0:02

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.