2

任何关卡流程或lua脚本都可以在黄貂鱼中获取动画对象吗?我尝试使用“set_local_position()”,但它仍然不起作用。

下面有 project.lua 中的代码

function Project.on_level_load_pre_flow()
    setObjPostion(Project.level_names.testLv,"mainobj",stingray.Vector3( 100, 100, 100 ))
end


function setObjPostion(levelsString,newObjString,newPosition)
    world = stingray.Application.new_world()
    world:load_level(levelsString)
    myobj = stingray.World.unit_by_name(world,newObjString)
    --local newPosition2= stingray.Vector3( 100, 100, 1 )
    stingray.Unit.set_local_position(myobj,1,newPosition)
end
4

0 回答 0