Wednesday, 22 December 2010
Developer Journal 21
[Y] Moved a cube.
[Y] Moved a cube in a specific direction.
[Y] Used direction that AI selected.
[Y] Created north wall.
[Y] Created south wall.
[ ] Created east wall.
[ ] Created west wall.
[ ] Moved the world so that all positions in the world are positive.
2:57 PM
* Connecting AI to physics and graphics code.
* Making sure I only add 1 entity to the world. I was adding agents and food.
* Do I apply force, impulse, or linear velocity?
* I'd love to have a way to change numbers without having to recompile.
* Trying btRigidBody::applyForce()
* I could learn by reading or by experimenting.
* My cube had mass 1.0f. I applied force 4,0,0 and relPos 0,0,0. The cube moved!
* I tried btRigidBody::applyImpulse() and the cube moved too quickly.
* btRigidBody::setLinearVelocity() works too. Using btRigidBody::applyForce() makes more sense.
* How do I apply force in the right direction?
* Orientation is a quaternion.
* btRigidBody::getCenterOfMassPosition()
* You can represent quaternions as an axis and an angle.
* Create a direction vector. Normalise it. Multiply by a factor.
* Using SOH CAH TOA.
* I've got 1 number representing the XZ angle.
* Using sin and cos to get X and Z for force.
* I don't know what relPos is for.
6:14 PM
* Created a wall.
* I should use velocity to help keep track of how fast agents move to keep population stable.
6:30 PM
* Stop
Labels:
developer journal
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment