Quick question

almost got the core of my game done and i wanted to ask for the people on what is the most effecent way to have a first person camera. Came up with 3 ideas

1: camera follow the model

2: attatch to a joint(don’t know much about this)

3: model follow the camera

Most people attach the camera to an imaginary "spring" near the model. If you search the forum post you should find some code posted.

But he says he wants to make it first person.



I would think the best way is to alter the position of your spatial (model), and then move the camera to its position. You might even consider using a CameraNode which you attach to e.g. the models head.



Then I would also force cull the model so that not the camera would be stuck "inside" the model in some angles.

alrite but can u attach stuff to joints because i know in most games guns are attachted to a joint

"wakeboardin" wrote:
alrite but can u attach stuff to joints because i know in most games guns are attachted to a joint


I would like to know this myself.....I use md5 by the way

In my new model stuff (which only supports MD5 currently) you can - but only ModelInstance objects, not just any node. You use modelInstance.addChild() to add a child model to a particular bone, then you can use child.setBaseTransform() to position your model relative to a particular bone.



That’s another thing to go onto my todo list then: creating a ModelInstance from an existing TriMesh.

which leads me to another question, sorry for hijacking, will it be possible to have bone based/influence collision detection and reaction…cause It’s funny that u can shoot a model the toe and have it die instantly e.g RTCW with any of the sniper rifles :? :? :?

I haven’t looked at collision that much yet, currently the bounding boxes for md5 models aren’t properly updated so it’s a bit of a moot point. But as long as triangle-accurate collisions work properly, I can check which triangle was hit and return the bone that influenced it most (which seems like the best option).



Another thing for my ever-growing todo list…

"chaosdeathfish" wrote:
But as long as triangle-accurate collisions work properly, I can check which triangle was hit and return the bone that influenced it most (which seems like the best option).
.

sounds good to me.

alrite big help thx