Hey Guys,
I am having trouble understanding how to go about doing something, it wasn't really covered in the book besides maybe a passing comment on it.
Here is a scenario, we have a game with say, a Tank actor in it for a game like battlefield or the old Battle Tanx game for the N64. The tank has possibly 3-4 different meshes in it; The main body, the turret, the cannon on the turret, and maybe the tracks. In the Model loading SDK I am using (ASSIMP) , when I load in a model I am given a list of meshes in the model, for the most part the test models I have been using have single meshes, yet I did try a tank model and only got the base. I understand that I could technically just loop through each of these meshes rendering each one, but from the way the book explained the Scene Graph, heirarchal objects such as a tank should really be creating child nodes for each of these additional meshes. So some questions
a) How are these individually represented in the physics system without seperating? Is it a single rigid body that represents the entire actor, or individual parts of that actor? And I suppose if the actor changes, say, the turret rotates, then we would update the shape of the rigid body so that the collisions match more accurately to the visual representation?
b) How are each of these individual orientations tracked? If the player moves his mouse left, it should rotate the tank's turret to the left, if my actor only has one World Transform to position and orient the tank base, how would I go about storing the other parts? Would it be in a special Actor Component?
c) Say were playing a FPS and you are walking along and a sniper decides to peg you off from a distance, so we would switch the type of bullet actor to a rag doll style, how is this managed? How are each limb identified and reported to the visual representation of the object? I know it would be via an event, but my question is more so to do with how an object would go from
Human Actor, Kinematically moved with a single collision hull
to
Human Actor, moved by physics, with multiple collision hulls.
I have read through the book looking for idea's, and have thought on how I would go about this, but I am drawing blanks here
I am having trouble understanding how to go about doing something, it wasn't really covered in the book besides maybe a passing comment on it.
Here is a scenario, we have a game with say, a Tank actor in it for a game like battlefield or the old Battle Tanx game for the N64. The tank has possibly 3-4 different meshes in it; The main body, the turret, the cannon on the turret, and maybe the tracks. In the Model loading SDK I am using (ASSIMP) , when I load in a model I am given a list of meshes in the model, for the most part the test models I have been using have single meshes, yet I did try a tank model and only got the base. I understand that I could technically just loop through each of these meshes rendering each one, but from the way the book explained the Scene Graph, heirarchal objects such as a tank should really be creating child nodes for each of these additional meshes. So some questions
a) How are these individually represented in the physics system without seperating? Is it a single rigid body that represents the entire actor, or individual parts of that actor? And I suppose if the actor changes, say, the turret rotates, then we would update the shape of the rigid body so that the collisions match more accurately to the visual representation?
b) How are each of these individual orientations tracked? If the player moves his mouse left, it should rotate the tank's turret to the left, if my actor only has one World Transform to position and orient the tank base, how would I go about storing the other parts? Would it be in a special Actor Component?
c) Say were playing a FPS and you are walking along and a sniper decides to peg you off from a distance, so we would switch the type of bullet actor to a rag doll style, how is this managed? How are each limb identified and reported to the visual representation of the object? I know it would be via an event, but my question is more so to do with how an object would go from
Human Actor, Kinematically moved with a single collision hull
to
Human Actor, moved by physics, with multiple collision hulls.
I have read through the book looking for idea's, and have thought on how I would go about this, but I am drawing blanks here
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