Hey Guys,
So I just got my code going for loading level files, and I was trying to figure out which component I should be changing to initially position my actor after it is created, my idea was that in my Actor xml file, the initial position would almost alway's be 0, kind of like defining a template for an actor that can be duplicated multiple times, then once created, the level file would hold a position for the actor to be moved to.
I decided that I would let the PhysicsComponent interface with Bullet Physics to move the object with the
btRigidBody->SetWorldTransform method. This did move the btRigidBody, but I had assumed that it would also update the motion state for that actor, which would propagate to the TransformComponent and the RenderComponent through an event. Updating everything. However it didn't do this, so I added in a MotionState->setWorldTransform to manually update this.
I noticed that this isn't the same as in the GCC source. Should I be doing it this way? It does work however I noticed that now my object's debug physics outline is red instead of green. Is that because of the DISABLE_DEACTIVATION? What is the purpose of that?
So I just got my code going for loading level files, and I was trying to figure out which component I should be changing to initially position my actor after it is created, my idea was that in my Actor xml file, the initial position would almost alway's be 0, kind of like defining a template for an actor that can be duplicated multiple times, then once created, the level file would hold a position for the actor to be moved to.
I decided that I would let the PhysicsComponent interface with Bullet Physics to move the object with the
btRigidBody->SetWorldTransform method. This did move the btRigidBody, but I had assumed that it would also update the motion state for that actor, which would propagate to the TransformComponent and the RenderComponent through an event. Updating everything. However it didn't do this, so I added in a MotionState->setWorldTransform to manually update this.
I noticed that this isn't the same as in the GCC source. Should I be doing it this way? It does work however I noticed that now my object's debug physics outline is red instead of green. Is that because of the DISABLE_DEACTIVATION? What is the purpose of that?
PC - Custom Built
CPU: 3rd Gen. Intel i7 3770 3.4Ghz
GPU: ATI Radeon HD 7959 3GB
RAM: 16GB
Laptop - Alienware M17x
CPU: 3rd Gen. Intel i7 - Ivy Bridge
GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
RAM: 8GB Dual Channel DDR3 @ 1600mhz
CPU: 3rd Gen. Intel i7 3770 3.4Ghz
GPU: ATI Radeon HD 7959 3GB
RAM: 16GB
Laptop - Alienware M17x
CPU: 3rd Gen. Intel i7 - Ivy Bridge
GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
RAM: 8GB Dual Channel DDR3 @ 1600mhz