Nah, it's because I was apparently in a rush to finish two methods - the cylinder and capsule creation methods. The capsule method is messed up too. Basically, to create a rigid body in havok you do something like this:
hkpRigidBodyCinfo rigidBodyCinfo;
rigidBodyCinfo.m_shape = new hkpCapsuleShape(hkVector4(0, 1, 0), hkVector4(0, -1, 0), 1.0f);
rigidBodyCinfo.m_mass = 10.0f;
rigidBodyCinfo.m_motionType = hkpMotion::MOTION_BOX_INERTIA;
hkpInertiaTensorComputer::setShapeVolumeMassProperties(rigidBodyCinfo.m_shape, 10.0f, rigidBodyCinfo);
hkpRigidBody* pRigidBody = new hkpRigidBody(rigidBodyCinfo);
// add to world blah blah don't feel like finishing this...
I forgot to set the hkpRigidBodyCinfo structures m_shape member apparently. I'm so awesome when I'm in a rush.
Also, the character controllers parameters are like so:
XENO void xenoMakeCharacterController(int id, float height, float radius);
XENO void xenoMakeCharacterController(int id, float height, float radius, float crouchHeight);
XENO void xenoMakeCharacterController(int id, float height, float radius, float crouchHeight, float moveSpeed);
XENO void xenoMakeCharacterController(int id, float height, float radius, float crouchHeight, float moveSpeed, float jumpHeight);
XENO void xenoMakeCharacterController(int id, float height, float radius, float crouchHeight, float moveSpeed, float jumpHeight, float strength);
XENO void xenoMakeCharacterController(int id, float height, float radius, float crouchHeight, float moveSpeed, float jumpHeight, float strength, float maxSlope);
And just for kicks, this is the code to the first one:
void xenoMakeCharacterController(int id, float height, float radius)
{
XenoPhysics::getSingleton()->m_characterList.pushBack(new CharacterProxy::ID(id, new CharacterProxy(height, radius)));
}
I made it more complicated than it had to be, but it works so oh well. The ID internal class is actually inherited via a template class I wrote. It's kind of fun. Here is the template class:
#pragma once
template<class T>
class dbIndexedItem
{
public:
class ID
{
private:
int m_id;
T* m_entity;
public:
ID(int id, T* entity)
{
m_id = id;
m_entity = entity;
}
~ID()
{
delete m_entity;
}
int getID()
{
return m_id;
}
T* getEntity()
{
return m_entity;
}
};
};
It works quite well in my opinion, and makes it so items are very easily indexable.