Arska134 Posted December 2, 2011 Share Posted December 2, 2011 Hello again. Here is some questions for you about controllers and editor: 1. How i can increase player controller height. Now it's tall as grass. player=CreateController(8.8,0.45,0.25,45) Tried to change values without luck and those values are from FPScontroller lua script. 2. Can i add my own models to Leadwerks editor? If yes, How? (i'am using evalution kit) 3. Can i add animated models with Leadwerks editor to scene? Thanks for advance. Quote Windows 7 Ultimate | Intel Core i7 930 @ 2.80 ghz | Nvidia GeForce GTX 560 | Leadwerks 2.5 | Blitzmax Link to comment Share on other sites More sharing options...
macklebee Posted December 2, 2011 Share Posted December 2, 2011 1) this is the syntax for CreateController(): CreateController:TController( height:Float, radius:Float, stepheight:Float=0.5, maxslope:Float=45.0, crouchheight:Float=0 ) the first parameter sets the height... which you have set to 8.8 meters... which should be way higher than your grass... if not, its no longer grass but rather a dense tropical forest... the fpscontroller script sets the controller as 1.8 meters tall. Offhand i would guess that you are not setting the camera to the correct height but instead setting it to the position of the controller that puts it at the ground... 2) the evaluation kit comes with converters now located in the Tools folder. just drag your model file onto the appropriate converter executable 3) yes 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...
Clackdor Posted December 2, 2011 Share Posted December 2, 2011 If you parent the camera to the controller, it is parented at the bottom of the controller. So, no matter how tall your controller is, the camera will always be in the grass. Use the PositionEntity(camera); command to move it up on the Y axis. Your code should look something like this: //Create the character controller controller = CreateController(); PositionEntity(controller,Vec3(x,y,z)); // Get framework main camera camera = GetLayerCamera( GetFrameworkLayer(0) ); EntityParent(camera,controller); //Position Camera off the ground and behind the controller (for 3rd person) PositionEntity(camera,Vec3(x,y,z)); Result is this: http://www.leadwerks.com/werkspace/page/videos/_/leadwerks-engine/my-first-demo-r105 Also, use the DebugPhysics(1); to show an outline of your player controller. Quote Link to comment Share on other sites More sharing options...
cassius Posted December 2, 2011 Share Posted December 2, 2011 its better to load chaeacters in by code if they are animated instead of placing them in the editor.... and give them a controller too. Quote amd quad core 4 ghz / geforce 660 ti 2gb / win 10 Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++ 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.