PageRenderTime 31ms CodeModel.GetById 28ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/Resources/Scripts/main_Function_setBaseFront.lua

http://github.com/thebigbang/Face_Editor
Lua | 31 lines | 17 code | 3 blank | 11 comment | 3 complexity | d19a00c4ff8fd0f2ed0045ec7ec8084a MD5 | raw file
 1--------------------------------------------------------------------------------
 2--  Function......... : setBaseFront
 3--  Author........... : 
 4--  Description...... : 
 5--------------------------------------------------------------------------------
 6
 7--------------------------------------------------------------------------------
 8function main.setBaseFront ( )
 9--------------------------------------------------------------------------------
10local s = application.getCurrentUserScene ( )
11    
12    if ( s == nil )
13    then
14    return
15    end
16
17    local bfront = scene.createRuntimeObject( s, "front" )
18    if ( bfront ~= nil )
19    then
20        this.front ( bfront )
21        object.setUniformScale (this.front(),3)
22        object.setRotation (this.front ( ),0,-45,0,object.kParentSpace  )
23        object.setTranslation (this.front(),0,40,0,object.kParentSpace )
24        --on ajoute le tag au front:
25  --bug?      scene.setObjectTag (s,this.front,"front")
26    else
27        log.error ( "base non charg´┐Że!" )
28    end
29--------------------------------------------------------------------------------
30end
31--------------------------------------------------------------------------------