Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Red Devil on March 08, 2008, 11:46:23 PM

Title: Gun/Effect Alignment
Post by: Red Devil on March 08, 2008, 11:46:23 PM
The Hadean pilot's gun doesn't line up correctly with the shot effect.

Which model do I have to adjust and which HP do I have to move to get them to line up?
Title: Re: Gun/Effect Alignment
Post by: General BlackDragon on March 09, 2008, 12:15:04 AM
look in the ODF...
Title: Re: Gun/Effect Alignment
Post by: Nielk1 on March 09, 2008, 12:17:12 AM
from what I have learned about docked weapon models, the 3D representation means nothing. The weapon HP in the unit's model is where the bullets will come from and the dock hp (or whatever hp you are using for the dock) is where the visual model is tacked on. So, the visual model could be no where need the weapon.

To make it come out of the right spot, if you want to keep the corrent orientation of other weapons like the ISDF and Scion ones on that pilot, you will ahve to move the gun's visual model's dummy root equlianet thing that I forget the name of. You cannot move the point of origin of the weapons fire.



If the above is wrong, pelase let me know, because I am having some rather agrivating issues in relation to weapon models docked onto ships.
Title: Re: Gun/Effect Alignment
Post by: bigbadbogie on March 09, 2008, 12:38:23 AM
all you have to do is move the hp_hand_1 hardpoint to wherever the front of the gun model is
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 09, 2008, 01:09:27 AM
The shot comes out of the end of the barrel where it should when viewed in 3rd person, but it doesn't line up with the weapon when viewed in 1st person pilot (cockpit).
Title: Re: Gun/Effect Alignment
Post by: Spawn on March 09, 2008, 01:21:22 AM
If that is the case RD, then I don't think it is possible to fix it without changing the first person model, which is animated.  It may be something to just leave alone as it doesn't seem all that important, unless it is different in 1.2 and the bug is caused by 1.3, but that is just my opinion and I know how you like things to be more than perfect.
Title: Re: Gun/Effect Alignment
Post by: Zero Angel on March 09, 2008, 01:30:02 AM
Its possible to do it by moving either the weapon HP forward on the pilot model, or by going into the XSI of the muzzle flash and moving its center axis on the root frame so that its just a little far back of the model. You gotta be careful of moving the weapon HP on the model because if you moved it forward too much then it will be possible to shoot through walls.
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 09, 2008, 04:31:28 AM
Interesting.  Thanks, I'll give it a whirl.
Title: Re: Gun/Effect Alignment
Post by: mrtwosheds on March 09, 2008, 06:27:37 AM
If its only in the first person cockpit view, you might want to tweak the first and last values of the animation of the weapon_cockpit model, if it has one.
These values will determine its position, only if they are 0,0,0 will the gun model appear with its root exactly at the hp dock point.
Just altering these values will move the gun position, when viewed in game.

The orientation of weapon models and cockpits is different from those of units for some weird reason.
Title: Re: Gun/Effect Alignment
Post by: bigbadbogie on March 09, 2008, 12:01:33 PM
i think that is because the size is different 0.12 to 0.1 or something
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 09, 2008, 07:41:19 PM
I tried tweaking the geometryScale values (they were different), but that didn't fix it.

I tried setting the first animation value to a larger value, and that moved the gun in the cockpit view to the right.

This must be due to me monkeying around with the gun placement for the Hadean pilot last year.  Details, details...

Thanks for all your help, guys.  Much appreciated.  :-)

Edit: BTW, I didn't try moving the HP's around in the model yet because that's more complicated.  (have to save the animations out, etc.)
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 10, 2008, 12:34:40 AM
I was able to get the gun moved to where the HP was, then I was able to (oddly) use ThreeD to line the HP up with the gun muzzle.

The running animation still moves the gun back to the center, so when you fire the gun while you're running, the shot comes from the side, but I'll save that for another day.   :roll:
Title: Re: Gun/Effect Alignment
Post by: Spawn on March 10, 2008, 03:55:19 AM
You never stop working man :D
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 10, 2008, 04:13:12 AM
Can't....help....it.  :-o

I can't decide if FE is pushing me forward or pulling me along.  :|
Title: Re: Gun/Effect Alignment
Post by: Avatar on March 10, 2008, 05:07:47 PM
I speak from experience when I say that pilots are very tough to do...

My advice is place a stock gun in the pilot's hand and align all HP's based on that.  Be sure to check in both standing and sniping position, and note where the shot actually hits when sniping.  A very tiny misalignment can mean good looking visually but terrible accuracy when sniping.

Why the pilot model has the weapon HP's is beyond me... the weapon should have the weapon hp....

-Av-
Title: Re: Gun/Effect Alignment
Post by: Nielk1 on March 10, 2008, 05:23:19 PM
It would be nice is docked models that include a special HP can have hp on the ship ignored in preference of the attached model.
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 10, 2008, 06:25:12 PM
I think it's due to it having to be attached to a GO and it having the eyepoint on the pilot/ship model.
Title: Re: Gun/Effect Alignment
Post by: mrtwosheds on March 10, 2008, 07:07:17 PM
Trouble is that were dealing with two weapon models, external view and cockpit view, the external one appears to all in the virtual BZ2 world, the cockpit is only ever viewed by "The Player". So if the hp was on the external gun you might still have the problem of the cockpit view not lining up quite right because it has its own animation but the external model is animated by the pilot models movement.
The trick is to be very careful how you animate it, chances are the hadean pilot cockpit animation may well be a straight copy of the isdf or scion cockpit animation.
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 11, 2008, 01:17:50 AM
 The thing is, if the HP was on the gun itself, there would have to be some linkage from the pilot model to the weapon model, but since the pilot/GO is the object firing the weapon and not the weapon firing the pilot/GO, the HP needs to be on the pilot/GO.

Hmmmm.... if the gun were on the end a turret (invisible), it would follow and fire from the end of the turret. 

Hmmm...I guess that, technically, it *is* on a turret (the torso, hence the ability to aim up and down), but if the pilot's arm was a turret, then you could aim it by moving the arms too, but you would need another input bound to it.

Oh worra, worra, worra...
Title: Re: Gun/Effect Alignment
Post by: Avatar on March 11, 2008, 11:53:38 AM
?????

They're treating the pilot as a ship, rather than the gun as a ship...  that's all.   Could've been done either way and they stuck with the 'pilot as ship' idea...

The gun should have the HP, should 'dock' with the player operating it, and the cockpit view should just be generated from the model.  :)

-Av-
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 11, 2008, 03:29:13 PM
Yes, and only craft and mines can fire weapons.  And friends don't let weapons fire weapons.  :-D
Title: Re: Gun/Effect Alignment
Post by: General BlackDragon on March 11, 2008, 03:36:03 PM
*cough popper cough*

:)

and splinter
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 11, 2008, 04:00:40 PM
Those are deployed weapons, not pilot weapons, and are fired by craft. 

You guys like to model.  Try making a pilot weapon that has its own HP.
Title: Re: Gun/Effect Alignment
Post by: Avatar on March 11, 2008, 04:36:49 PM
Ignores it...

You CAN animate weapon model skeletons, though, and the animation will play...  all the time, though, it's a loopy thing.

The Olympian rifle spins slowly because of this, and while I didn't intend for it to do so that's what happened and I now like it...  :)

-Av-
Title: Re: Gun/Effect Alignment
Post by: Red Devil on March 11, 2008, 05:54:40 PM
Thinking about adding some wobble to the rifles, especially sniper.
Title: Re: Gun/Effect Alignment
Post by: OvermindDL1 on March 11, 2008, 06:14:28 PM
On most game engines the weapon usually has a 'hand' hp/bone, which is attached to a 'hand' on the model (or they could name it something like 'head' and have it attach to the head for a hat-gun or something), thus they always are perfectly synced as long as the 'hand' is placed right, but to do that you can just bring in a player model, line them up, then delete the player model and all bones except the hand bone, all perfect.
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)