Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Wrong position of imported object.

Recommended Posts

Hi, This might be trivial but not sure how to solve this. I have crated a simple model in Blender with texture and exported it to .fbx. Imported that to Leadwerks without issue, set collision mesh and placed in 3D space (see attached pic). This is my character in the game ,  Roomba like cleaning robot. So when i start the game , robot gets flipped 90 degrees. What gives ? When i create a simple cylinder, size of of my object and attach my player script all is fine, cylinder does not flip, and works just fine. Not sure what's going on, any help apprecieated. Player script below.

function Script:Start()
    --Create a camera
    self.camera = Camera:Create()
    --Update the camera
    --Initial Vars
    self.pos = 0
    self.minimal_speed = -3
    self.max_speed = 3
    self.lives = 3
    self.speed = 0
    self.tilt = 0
    self.energy_depletion = 0
    self.lastTime = Time:Millisecs();
    self.torch = PointLight:Create() 
--Adjust the camera orientation relative to the ball
function Script:UpdateCamera()

function Script:UpdatePhysics()
    --Get the game window
    local window = Window:GetCurrent()

function Script:UpdateWorld()
    --Update the camera each frame
    if energy > 0 then
        -- move if you got energy
        local move = ((window:KeyDown(Key.Up) and 1 or 0) - (window:KeyDown(Key.Down) and 1 or 0))*3
        local strafe = ((window:KeyDown(Key.Right)and 1 or 0) - (window:KeyDown(Key.Left) and 1 or 0))*3
        if window:KeyDown(Key.Up) or window:KeyDown(Key.Down) or window:KeyDown(Key.Left) or window:KeyDown(Key.Right) then
            if energy > 0 then
                if (Time:Millisecs() > self.lastTime + 80) then
                    self.lastTime = Time:Millisecs();
                    energy = energy -1
        -- out of energy, can't move
        move = 0
        strafe = 0
    -- Light
    --light = SpotLight:Create() 

function Script:PostRender(context)



Link to post
Share on other sites

You can collapse the model in the model editor window and this will reset the rotation to 0,0,0 and then it will work with character physics.

If you need to adjust the rotation further around the Y axis there is a character angle physics setting available in the editor for this purpose.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...