AndiSenior Posted January 5, 2010 Share Posted January 5, 2010 I tried to apply a character controller. Everthing works except moving of the controller. Therefore I have copied the code from the Character Controller Tutorial and from the Developers Wiki CreateController() example as well. Both work fine, except moving the controller In DebugPhysics() in all my tries, the chontroller appears as inactive body, no wonder moving isnt possible... What could be wrong? Thanks Andi Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted January 5, 2010 Share Posted January 5, 2010 Try adding mass to it with SetBodyMass() Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
macklebee Posted January 5, 2010 Share Posted January 5, 2010 does your controller have a mass? That is required. 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...
macklebee Posted January 5, 2010 Share Posted January 5, 2010 jinx, you owe me a coke 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...
AndiSenior Posted January 5, 2010 Author Share Posted January 5, 2010 SetBodyMass did it Thanks for your support! Hopefully Josh will adjust the tutorial sometimes... Thanks Andi Quote Link to comment Share on other sites More sharing options...
AndiSenior Posted January 5, 2010 Author Share Posted January 5, 2010 if I use a body as ground everthing works: TBody ground=CreateBodyBox(10,0.1,10); PositionEntity(ground,Vec3(0,-2,0)); EntityType(ground,1); if I use a model instead, my player falls through TModel scene=LoadModel("scene.gmf"); EntityType(scene,2); Collisions(1,2,1); Further I dont really understand the difference between EntityTypes 1 and 2 Hope to helpful hints again. Thanks Andi Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted January 5, 2010 Share Posted January 5, 2010 Whats the position you are setting your controller to ? Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
AndiSenior Posted January 5, 2010 Author Share Posted January 5, 2010 Got it in the meantime... As you have guessed, it was the controller position... So in the CharacterController Tutorial this two lines are missing: SetBodyMass(player,1); PositionEntity(player,Vec3(0,2,0)); Hard times for a newbie... Thanks anyway Andi Quote Link to comment Share on other sites More sharing options...
Chris Adkins Posted January 5, 2010 Share Posted January 5, 2010 Hard times for a newbie... Newbie here . Any other things I should look out for in the tutorials? Quote Link to comment Share on other sites More sharing options...
Chris Adkins Posted January 5, 2010 Share Posted January 5, 2010 I have finished the Tutorial for Character Controller with the additions recommended here and in one other place. I can walk, run, jump, and everything! BUT (there is always a but) I can't walk up the ramps/stairs, and I am not walking on the floor. I am just floating in mid air. It is very weird. I can't find the problem. I have the gravity set, I have the mass set, I have collisions set, I don't know what else to set. Ideas? Quote Link to comment Share on other sites More sharing options...
Chris Paulson Posted January 6, 2010 Share Posted January 6, 2010 I beleive this is because the position of the controller changed in LE versions and the zero Y pos is the centre of the controller. If controller is 1.8 high do this:- pos = EntityPosition( controller, 1) PositionEntity(yourModel, vec3(pos.X, pos.Y - (1.8/2), pos.Z,1) Quote Link to comment Share on other sites More sharing options...
Chris Adkins Posted January 6, 2010 Share Posted January 6, 2010 I found the problem. How embarrassing. I still had the physics from an old scene, but the drawing from the new screen. 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.