Character Controller Grphic Error

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Lyrical
Posts: 7
Joined: Fri Mar 19, 2010 4:40 pm

Character Controller Grphic Error

Post by Lyrical »

I've managed to extract some of the code and add it into a new project from the BEPUPhysics demo.

I used the default playground model and also the code for the character controller.

With the EntityDrawer i'm getting a strange graphic drawing at the bottom. I believe this to be the foot of the character controller.
In the BEPUPhysics demo this doesn't show yet i'm using the same character and characterinput classes from the demo.

Image

This image shows the controller with the render of the foot. (What is this? section at the bottom)

I can post main code if this will help.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Character Controller Grphic Error

Post by Norbo »

Given that it looks cylindrical (or at least curved) I don't think it's the feet 'detector,' which is a box. The support casting shape is a cylinder, but the default renderer shouldn't be trying to draw that. It may be the actual body of the character.

The reason it doesn't show up in the demos is that it doesn't belong to a space at the beginning of the simulation. The renderer will only create rendering objects for entities that belong to the space. If you were to activate the character before the time it adds entities to the renderer, you can see the feet detector box (as well as the character cylinder if you were outside of it).

The CharacterControllerInput's cameraOffset may be outside the character's body, which allows you to see it.
Lyrical
Posts: 7
Joined: Fri Mar 19, 2010 4:40 pm

Re: Character Controller Grphic Error

Post by Lyrical »

Thank you Norbo i was indeed activating the character controller to early.

I simply moved the <characterobject>.activate(); after the section to DisplayObject Creation and the controller is working great.

This has been driving me crazy for 2 days. i should know better than to struggle with a problem when there is an excellent forum
to answer those difficult questions.

Lesson lernt.

Appreciate it Norbo.
Post Reply