Jump to content

Create/UpdateController


AndiSenior
 Share

Recommended Posts

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

Link to comment
Share on other sites

Try adding mass to it with SetBodyMass()

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

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 :lol:

 

TModel scene=LoadModel("scene.gmf");

EntityType(scene,2);

 

Collisions(1,2,1);

 

Further I dont really understand the difference between EntityTypes 1 and 2 :blink:

 

Hope to helpful hints again.

 

Thanks

Andi

Link to comment
Share on other sites

Whats the position you are setting your controller to ?

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

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... :blink:

 

Thanks anyway

Andi

Link to comment
Share on other sites

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?

userbar792791.gif
Link to comment
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.

Guest
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.

 Share

×
×
  • Create New...