Driklyn Posted September 14, 2013 Share Posted September 14, 2013 Have a player created from a pivot added to my map via the editor with these physics properties set: Physics: Character Controller Mass: 1.0 Collision: Character And a floor underneath, a box with these physics properties set: Physics: Rigid Body Shape: Box Shape size: (Fit Shape) Mass: 0.0 Collision: Scene When running the game, the player falls a few feet and lands on top of the floor correctly. However, once I move in any direction or rotate greater than +/- 45º or so on the y-axis, the player instantly warps into the floor, moving from a y-position of 0.273252 to 0.001953. Any ideas why? Here's my player script: function Script:Start() self.camera = Camera:Create() self.camera:SetPosition(self.entity:GetPosition()) end function Script:Move() local w = window:KeyDown(Key.W) and 1 or 0 local a = window:KeyDown(Key.A) and 1 or 0 local s = window:KeyDown(Key.S) and 1 or 0 local d = window:KeyDown(Key.D) and 1 or 0 return Vec3(d - a, 0, w - s):Normalize() end function Script:Look() local mouse = window:GetMousePosition() local center = Vec2(context:GetWidth() / 2, context:GetHeight() / 2) window:SetMousePosition(center.x, center.y) return Vec3(mouse.y - center.y, mouse.x - center.x, 0) end function Script:UpdatePhysics() local move = self:Move() local look = self:Look() look = look + self.camera:GetRotation() look.x = Math:Clamp(look.x, -85, 85) self.entity:SetInput(look.y, move.z, move.x, move.y) self.camera:SetPosition(self.entity:GetPosition()) self.camera:SetRotation(look) end Quote Link to comment Share on other sites More sharing options...
Josh Posted September 15, 2013 Share Posted September 15, 2013 An example map would be easier to examine. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Driklyn Posted September 15, 2013 Author Share Posted September 15, 2013 Don't see a way for me to attach any files here, so I uploaded the map + scripts here: http://temp-share.com/show/Pf3m6A8W2 Quote Link to comment Share on other sites More sharing options...
Josh Posted September 15, 2013 Share Posted September 15, 2013 The "More reply options" button has...more reply options including file attachment FYI. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Driklyn Posted September 15, 2013 Author Share Posted September 15, 2013 All I see is a "My Media" button, but it won't let me upload anything to it. I have no "Add Attachment" button or anything similar, even on "More Reply Options" page... Quote Link to comment Share on other sites More sharing options...
Admin Posted September 15, 2013 Share Posted September 15, 2013 Ah, you are not a developer yet...if you are using the trial version, a bug in the character controller does not surprise me. A lot of work was done to improve this and I specifically remember a problem like this. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.