继承自:
在UI中展示3D模型,将模型节点(如ModelObject)放置到子节点即可(注:模型节点是在ModelView的场景中展示,节点自身的位置,转角等属性也会生效)
local root = SandboxNode.new('UIRoot', game.WorkSpace)
root.Name = 'uiroot'
local ModelView = SandboxNode.new('UIModelView', game.WorkSpace.uiroot)
ModelView.Size = Vector2.new(500, 500)
ModelView.Position = Vector2.new(500, 500)
ModelView.CanCameraMove = true
ModelView.CameraDist = 700
local newModel= SandboxNode.new('Model')
newModel.Name = "my_model"
newModel.ModelId = "sandboxSysId://entity/100011/body.omod"
newModel.Position = Vector3.new(0,0,0)
newModel:SetParent(ModelView)