Game Development Community

get datablock from an object in forest

by Dimitris Matsouliadis · in Torque 3D Professional · 11/10/2015 (8:25 am) · 3 replies

Know someone how can I recognize the datablock of an object with collision or other contact when it is grille through the forest? Not necessary datablock, any property that identifies the object.
Thanks

#1
11/11/2015 (7:04 am)
Is it stored in a forest object? If it's part of a brush in a forest object I have no idea how to get that information back - might have to do something engine-side....

Otherwise, you can use the onCollision callback for your player to find out what you hit or you can use a raycast from a mouse click like the RTS Prototype does.
#2
11/12/2015 (4:56 pm)
Yes is stored in the forest. Is easy to place a big number of objects in forest object. Collision working but return forest id for all datablocks. I don't know the way to open forest data for records read...
Thanks for answer :)
#3
11/12/2015 (5:03 pm)
And 1 more Question.
An easy way to measure the distance from an object to surface of terrain?