Game Development Community

1st person melee animation problem

by Infinitum3D · in Torque Game Engine · 11/10/2008 (11:24 am) · 4 replies

I've successfully incorporated Josh Moore's Server Side Melee System into TGE1.5.2
however, when I try to use the sword in 1st person view, the animation does not move the sword. The camera moves (the image sways a little like Kork is swinging a sword) and damage occurs, but the displayed sword does not move.

Realm Wars compensated for this by automatically switching to 3rd person perspective when using a sword or an axe, but that's a "hack".

I thought that the only difference between 1st person and 3rd person was camera position, but apparently that is not correct.

Any thoughts?

Tony

#1
11/10/2008 (11:28 am)
There is a resource for "more realistic first person" if you use that it should swing the sword. as far as i know, when the player is rendered in first person the sword that you see in front of you is not the same as the sword in 3rd.
#2
11/10/2008 (11:30 am)
Hmm.. set the weapon coords of the sword to 0 0 0. This will put the sword in the orcs hand, and move it with the animation, as opposed to offsetting in in your first person view.


Then, in your player.cs, set renderfirstperson to true, so you see Korks body.

This is from memory, but you get the idea.
#3
11/10/2008 (11:35 am)
From the original resource:

This works in first person mode just fine, you only need to change a couple of script variables.
in sword.cs, delete or comment out this line:

eyeOffset = "0.1 0.4 -0.6";
** you can also use 0 0 0 like I said above"


in player.cs, find

renderFirstPerson = false;

and make it
renderFirstPerson = true;
#4
11/11/2008 (5:58 am)
Thanks! Works like a charn now.

Tony