以米为单位获取距离 [英] get distance in meters maxscript
本文介绍了以米为单位获取距离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法以米为单位来获取两个物体之间的距离?
Is there a way to get distance between two objects in meters?
我现在正在尝试
units.displayType =#metric
myDistance = distance aObject1 aObject2
label1.text = distance as string
当然,这给了我这些对象之间的距离,但以3dsmax为单位...
Of course this is giving me the distance between those objects but in units of 3dsmax...
因此,如果有人知道方法或公式,我将非常感谢您
So if anyone knows a way or a formula i will be really grateful thank you
推荐答案
There is a whole topic in maxscript help dedicated to this, Units Struct - Accessing System and Display Units
您需要的代码如下:
label1.text = units.formatValue myDistance
这篇关于以米为单位获取距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文