Modding, Mission Design, and Coding > Modding Tutorials

multipart turrets on angled surfaces

(1/6) > >>

Vertigo 7:
can this be done? i thought that you could "define" the X Y and Z rotation

I think this has already been described in IRC but...

Some of the work needs to be done in some modelling application and some while the subobject properties. First you just need to know the uvec (ie. surface normal of the turrets location) and fvec (turrets front vector. These can be determined in number of ways, most often this means that you can handle basic trigonometry.

Also the turret should also be placed (while modelling) so that it faces the fvec AND has barrels in 90 deg elevation (ie. pointing along uvec)

I've written a program that'll help generate the uvec and fvec. I'll get it uploaded sometime soon.  (BTW it does require .Net 2.0)

Here you go:

It's ready for 3dmax usage (or any app where Z is up/down) and for those still using the old truespass cob method.

The angle of the turret is the "Rotation", if the original turret isn't facing up forward (i.e. it's original angle isn't at 0,0,0) then add "turret origin".
i.e. The most common case: if you made a turret facing up-forward then rotated it to it's correct angle on the hull of let's say (20,0,0) then rotation would be (20,0,0) and turret origin would be (0,0,0). 

I'm not make any guarantees that it's 100% correct. 

I'd be surprised if Max doesn't already have some feature that allows a user to view & manipulate normals.


[0] Message Index

[#] Next page

Go to full version