AggrorJorn Posted September 19, 2010 Share Posted September 19, 2010 Since college started again I didn't have much time to spend on Leadwerks nor making new tutorials about Lua. But here is a little something for that in return: A video tutorial which has a time lenght of over 1 hour!!! This video tutorial explains how to create character controllers in your Lua program. The tutorial will explain the following: Creating a character controller. First person view. Jumping and crouching. Camera smoothing. Camera angles. Third person view. -- PDF will be added soon. http://leadwerks.com/werkspace/index.php?/page/resources/_/programming/lua/9-creating-a-character-controller-with-lua-r49 Quote Link to comment Share on other sites More sharing options...
macklebee Posted September 19, 2010 Share Posted September 19, 2010 not bad... some suggestions to fix or clarify in the pdf version: This line is not doing anything since camera is not a Vec3 valuecontroller:SetPosition(camera) This line is not needed because the relationship is already being set by the standard collisions.lua file that is ran at the start of the program since its in the scripts/start folderCollisions(COLLISION_CHARACTER,COLLISION_SCENE,1) These lines are not doing anything... I assume they were supposed to be the initial settings for 'gx' & 'gy'dx=0.0 dy=0.0 The 5th parameter for the controller update is maxacceleration, not smoothing. It determines how quickly the controller will accelerate in movement. When starting to move, it controls how quickly it will get to maximum speed. When you stop, it controls how fast you slow down. So a higher maxacceleration value will make you slow down quicker and remove the 'ice-skating' effect. still all in all, a decent guide to help beginners use controllers in lua. good job. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
wailingmonkey Posted September 20, 2010 Share Posted September 20, 2010 way to keep rockin' it, Aggror! (and thanks for the additions, macklebee) Quote Vista Ultimate SP1 64bit | Q6600 2.40 GHZ | 8GB RAM | 320MB Nvidia 8800GTS Link to comment Share on other sites More sharing options...
Raul Posted September 20, 2010 Share Posted September 20, 2010 Very nice Aggror! You are doing very well with this tutorials Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
AggrorJorn Posted September 20, 2010 Author Share Posted September 20, 2010 Very good feedback macklebee. That is correct. Didn't know that. they were indeed intended for the camera movement. but they can be removed . Ah darn it. I must have confused this with the previous parameter. I did get the name of the parameter right though I will adjust them in the pdf and add some comments on youtube. 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.