Quantcast
Channel: Answers for "Getting treePrototype information from RayCasting collisions onto terrain?"
Viewing all articles
Browse latest Browse all 4

Answer by toddf

$
0
0

The approach I ended up using was actually creating the collider capsules on my own, using a script (shown by a coder with a similar problem) that looped through each of the treeInstances within terrainData and created a collider that matched the location on the existing terrain. You end up rebuilding some of the terrain information on your own this way, but it's far more accessible. Having a script that does this offline is practically a must, as it takes a few minutes to calculate. Once it's done, however, you'll have capsules you can add metadata to, and whose individual info can easily be read by a ray cast.


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images