Jump to content

Admin

Administrators
  • Posts

    3,209
  • Joined

  • Last visited

Posts posted by Admin

  1. Do this:
     

    --Create a window
    window = Window:Create()
    context = Context:Create(window)
    world = World:Create()
    camera = Camera:Create()
    camera:Move(0,0,-4)
    local light = DirectionalLight:Create() 
    light:SetRotation(35,35,0) 
            
    local parent = nil 
    local child = nil 
            
    parent = Model:Box() 
    parent:SetColor(0.0,0.0,1.0) 
    parent:SetMass(0) 
    parent:SetPosition(1,0,0) --Move parent box a little bit to the right
    parent:SetGravityMode(false) 
            
    child = Model:Box() 
    child:SetColor(1.0,0.0,0.0) 
    child:SetMass(1) 
    child:SetPosition(2,0,0) 
    child:AddTorque(10,0,0) 
           
    local pos = parent:GetPosition(true)
    local joint = Joint:Ball(pos.x, pos.y, pos.z, child, parent) 
    
    while true do        
            if window:Closed() or window:KeyHit(Key.Escape) then return false end
    
            Time:Update()
            world:Update()
            world:Render()
            context:Sync()
    
    end

     

  2. This is sort of difficult because the event occurs inside the folder creation code, when a new project is loaded. I am inclined to leave it alone because restructuring that would be more work than I feel is worth it for a relatively minor issue. And the fact that I will be starting on a new editor soon.

×
×
  • Create New...