hardpoint direction

S

snuzzleduck

Guest
for the life of me i can't seem to figure out how to correctly change the direction of hardpoints. i thought the vector 1, direction, vector 2 thing worked like just the right hand rule or something, but that doesn't seem to do what i want it to. I'm trying to make a hardpoint that faces directly forward.
 
A hardpoint is a named 3x4 matrix of 12 32-bit floats, in the order X.x, X.y, X.z, Y.x, Y.y, Y.z, Z.x, Z.y, Z.z, pos.x, pos.y, pos.z. The left-handed coordinate system is used, with positive x to the right, positive y up, and 'looking' along positive z. A transform at the origin would be:
1,0,0
0,1,0
0,0,1
0,0,0
A transform looking to the right, 5 meters to the right of the center of the object would be:
0,0,-1
0,1,0
1,0,0
5,0,0
The X, Y, and Z vectors must be normalized vectors. With non-axis-aligned rotations, things will be easier for you, otherwise you'll have to get out your calculator...
 
Oh, I forgot mention that the first example hardpoint I gave is facing forward. However, with a position of <0,0,0>, it is also at the center of the object. You can move this by changing the position in left-handed space (mentioned below...)

Good Luck!

-ALS
 
Darnit! I forgot to mention again that this applies to Prophecy and Secret Ops.
smile.gif


-ALS
 
Last edited by a moderator:
thank you very much, i understand now, and i have to say i'm honored to see you here too, Mr. Sommers. hope to here more from you.
 
Mr. Sommers, i figure if anyone can answer this you probably could. is there anyway to add more guns to secret ops? i've already tried (unsuccessfully of course) to just add in new data chunks into the bullet.iff. is there anyway that it could be done?
 
Unfortunately, no. The bullet file stores an actual number of bullets which the exe file checks to ensure that the correct bullet file is being used. Believe it or not, this was to prevent hacking.
frown.gif


This is too little too late, but the exe should have asked the bullet file how many bullets it had instead of the exe demanding the bullet file have x number of bullet types. This would allow the users to add new bullet types without requiring a new exe.

In short, you can change the types of bullets, but not add new ones.

-ALS
 
Last edited by a moderator:
curses. thats what i thought. the ability to damage components or work only on turrets is encoded in the .exe too, i suppose. thanks.
 
It's not worth it. That "number" is also used to know how many bullet types to allocate (memory-wise). One would have to know how often in the code that "number" was used, and where to change it. What you need is a new executable with the feature added, but that can't happen.
 
Back
Top