Hi all,
I'm trying to push boundaries on the web using Ammo.js (a javascript port of Bullet) and Three.js to create a simple game. If you're not familiar with Ammo, it's a pretty straightforward Bullet port. I have access to most of the same classes and types that are available in Bullet, but everything is in the Ammo namespace, ie:
btBroadphaseInterface* broadphase = new btDbvtBroadphase();
btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
becomes
var broadphase = new Ammo.btDbvtBroadphase();
var collisionConfiguration = new Ammo.btDefaultCollisionConfiguration();
var dispatcher = new Ammo.btCollisionDispatcher(collisionConfiguration);
var solver = new Ammo.btSequentialImpulseConstraintSolver();
Unfortunately we don't have certain things, like the character controller or kinematic character controllers, which makes life a little more difficult when trying to create a character that can climb slopes, stairs, etc.
I'm hoping someone might be able to explain in detail the process of creating a character in Bullet that can do these sort of things without using the character controllers (C++ is fine). Unfortunately, I wasn't able to find anything via google searches. At this point, all I have are btCapsuleShapes that have impulses applied to them with user input. These bodies sit on the ground for a moment, but slowly gravity takes over and they roll onto their sides.
Appreciate any help.
basics for creating a character?
-
- Posts: 149
- Joined: Fri Jun 24, 2011 8:53 am
Re: basics for creating a character?
It appears this is no joke: I have myself created a few threads and posted a few messages about this. Other people seems to have problems (see this).
I am now reaching the point I can no more procrastinate solving this problem. My case is complicated by a requirement I have: I need kinamatics (characters) to fall just like dynamics. Their behavior is only allowed to diverge after the first hit. That is, two object - a fully dynamic one and a fall-enabled kinematic - would have to fall basically in the same way.
This turned out to be pretty much a nightmare, subtle details in my world asset make the whole thing fairly involved. I'm currently planning on using multiple independent simulations to be used as support for each object.
I'm afraid I still don't completely understand what - or why - the kinematic controller code is doing.
Unfortunately, moving objects by applying impulses is not going to work in the long run. There's not enough flexibility, although you might get some mileage.
I am now reaching the point I can no more procrastinate solving this problem. My case is complicated by a requirement I have: I need kinamatics (characters) to fall just like dynamics. Their behavior is only allowed to diverge after the first hit. That is, two object - a fully dynamic one and a fall-enabled kinematic - would have to fall basically in the same way.
This turned out to be pretty much a nightmare, subtle details in my world asset make the whole thing fairly involved. I'm currently planning on using multiple independent simulations to be used as support for each object.
I'm afraid I still don't completely understand what - or why - the kinematic controller code is doing.
Unfortunately, moving objects by applying impulses is not going to work in the long run. There's not enough flexibility, although you might get some mileage.