Game Development Community

[Bug 1.0] Full Template - Hand & Weapon rendering issue

by elvince · in Torque 3D Professional · 10/03/2009 (10:41 am) · 12 replies

Issue: Model hand are not stick to the weapon

How to reproduce:
Create a Full template project
Run the Empty map
Move mouse up & down and you will see the hands appear on the top of the rocket launcher.

I hope this is not a duplicate.

#1
10/03/2009 (10:50 am)
it has ALWAYS been like that, since TGE days.
#2
10/03/2009 (10:57 am)
You mean the left hand? No it doesn't and never has, it's not animated in such a way that it would. Been that way since TorkOrk and TGE.

It's because the weapon (and right hand in Gideon's case) isn't mounted to the player, but floating in space using eyeoffset. If you model your characters and set them up (script and animations) to hold the weapon correctly they will, but keeping it aligned with the eyenode at the extremeties of the Z axis is a real pain.

Personally, I had been using this system with AimDownSight animations but had been forced to cut down the available Z angle for player arm movement in order to keep the sight perfectly aligned with the eyenode. However I might ditch this method in favour of having freefloating arm meshes (as the Torque models do - check out Beta5 shape edit and pull all their arms off) and then a higher poly arm set attached to weapons and show/hide relevant meshes in first/third person, whilst attaching the camera to a weapon sight node when zooming the camera to make certain the aim point is central at all angles.
#3
10/03/2009 (11:05 am)
thats fine for weapons, but when you mount a vehicle, your poor character sits there with no arms, and its visable
#4
10/03/2009 (11:15 am)
@Steve,
you may be interested in this,
there is a way to use eyeOffset, and not, at the same time.
it lets you run around with your weapon not using eyeOffset, and when using ironsights, you actually use eyeOffset, but not.
it makes your iron sights deadly accurate, with out any fiddling with z at all, and still have the feel of not using eyeOffset, but infact you are.
difficult to explain, but is super in action.
#5
10/03/2009 (11:34 am)
In beta 5 with the forge soldier, I never seen this behavior. Is it because of the model was more advanced than current Gideon?

I checked my beta 5 game, and the hand are perfectly fit.

More, on Giddeon, my issue is on the Left Hand, not the right hand(the one which is mounted).

#6
10/03/2009 (11:50 am)
@Deep1
Nah, you re-show 3rd person arms and hide first person

@Deep2
Post script or it doesn't happen ;)
#7
10/03/2009 (3:19 pm)
sorry took so long to reply, you tube takes for ever to upload vids.
anyway, the video shows what I am talking about, and the explaination, and script snippet follows the video below.
you will notice there are no crosshairs or huds, at all, I want my game like this, it makes you focus more, so the ironsights have to be spot on accurate. this does it, while still keeping the feel real, no weapons pinned to the screen.



@Steve,
it begins with implementing this resource, which relies on the fact that you WILL use eyeOffset.
but we dont want to use eyeoffset, cause its too fake, the weapon doesnt move with the player, it moves with the camera, stuck to a corner of the screen.
we want the weapon to move with the player, in his hands by NOT using eyeoffset.
but if we remove/comment out the eyeoffset line, like this, //eyeOffset = "0.2 0.5 -0.25";
we get the weapon in our hands,
but the adjusteyeoffset, that the ironsights resource uses, needs the eyeoffset to be there.
what do we do?
just above the line
eyeOffset = "0.2 0.5 -0.25";
we add
useEyeOffset = false;
this causes the weapon to think that eyeoffset is not there, so we see it in our hands,
but the resource has no idea what
useEyeOffset = false;
means, so when called, it functions, and we have ironsights that move the weapon in line with our eye, but is still mounted in the players hands

and here is the bit of script that makes it all work
mountPoint = 0;
    useEyeOffset = false;// THIS IS THE LINE
    eyeOffset = "0.2 0.5 -0.25"; // 0.46=right/left 0.5=forward/backward, -0.5=up/down

    // Added for adjustable eyeOffset   
    adjustEyeOffset   = true;    
    normalEyeOffset   = "0.2 0.5 -0.25"; //This should always match eyeOffset   
                                           //value listed above   
    adjustedEyeOffset = "-0.0015 0.4 -0.2525"; //This is the eyeOffet value we   
                                                //switch to on zoom   
    // Added for adjustable eyeOffset 

    // When firing from a point offset from the eye, muzzle correction
    // will adjust the muzzle vector to point to the eye LOS point.
    correctMuzzleVector = true;
#8
10/03/2009 (3:24 pm)
@elvince,
really sorry to have hijacked your thread.
#9
10/03/2009 (4:05 pm)
A few of us were just talking about this the other day. Unfortunately, as a result of using eyeOffset, this has always been the case and is not a bug.

We could limit the range of the look animations and that would prevent the left hand from coming into view. You could even use "fake" hands, coded or by using LOD tricks. Even some of the suggestions mentioned here about hiding meshes would work. Or we could disable the usage of eyeOffset, but this wouldn't be acceptable for every single model (player or weapon) out there.

For every one of these possibilities your player, their animations, and all of your weapons would have to be designed around whichever principle you decide to use. In the end though, there is no perfect solution nor would every end-user agree with whatever method was used.
#10
10/04/2009 (3:17 pm)
That's good to know that there are solution. Thanks deep for your answer. This might be interesting to have a thread with all solutions that you can implement ans how to do things. This is clearly valuable for torque beginner like me. Can someone explain what solution has been implement in beta 5 With forge soldier it could be great. Thanks
#11
10/04/2009 (4:01 pm)
Forge soldier's "solution" is just a different animation. The left arm still doesn't stick to the gun, it just floats underneath with a different eyeOffSet value, whilst Gideon's animation is a little more obvious at the extremeties.
#12
10/13/2009 (10:25 am)
Steve,
Ok I understand the trick.

Thanks,