just some help for os modders - .as files
Posted: Thu Jun 19, 2014 1:59 pm
ill just leave this here - Rifle rear sight drawing parameters explained a bit (View.as)
whatever
Matrix4 sightMat = weapMatrix;
//idk
sightMat *= CreateTranslateMatrix(0.025f, -7.f, -4.5f);
// CreateTranslateMatrix("left/right_coordinate".f, "distancefromeye_coordinate".f, "up/down_coordinate".f)
// More explanation: Basically you'll only need the middle value, which changes how far the model is from eye //(more=far). it can even have negative values.
sightMat *= CreateScaleMatrix(0.05f);
// determines size scale. "Weapon.kv6" seen in 3rd person has scale = 1.0f,
//"WeaponNoMagazine.kv6" seen in 1st person has scale = 0.5f
// this rear sight has scale = 0.05f, that means it is 10 times smaller than 1st person gun
//AND 20 times smaller than 3rd person gun.
// meaning that:
// CreateScaleMatrix(0.5f) and CreateScaleMatrix(0.05f) will have 1:10 cubes.
// CreateScaleMatrix(0.5f) and CreateScaleMatrix(0.025f) will have 1:20 cubes.
// CreateScaleMatrix(0.5f) and CreateScaleMatrix(0.02f) will have 1:25 cubes.
// CreateScaleMatrix(1.f) and CreateScaleMatrix(0.5f) will have 1:2 cubes.
// NOTE: do not forget any dots (1.f etc.), even if there are no numbers after the dot.
// NOTE: 1:20 and more doesn't look beautiful anymore, the sides of cubes start flickering. Stay simple!
param.matrix = sightMat;
//idk
renderer.AddModel(sightModel1, param);
//renders model
whatever
Matrix4 sightMat = weapMatrix;
//idk
sightMat *= CreateTranslateMatrix(0.025f, -7.f, -4.5f);
// CreateTranslateMatrix("left/right_coordinate".f, "distancefromeye_coordinate".f, "up/down_coordinate".f)
// More explanation: Basically you'll only need the middle value, which changes how far the model is from eye //(more=far). it can even have negative values.
sightMat *= CreateScaleMatrix(0.05f);
// determines size scale. "Weapon.kv6" seen in 3rd person has scale = 1.0f,
//"WeaponNoMagazine.kv6" seen in 1st person has scale = 0.5f
// this rear sight has scale = 0.05f, that means it is 10 times smaller than 1st person gun
//AND 20 times smaller than 3rd person gun.
// meaning that:
// CreateScaleMatrix(0.5f) and CreateScaleMatrix(0.05f) will have 1:10 cubes.
// CreateScaleMatrix(0.5f) and CreateScaleMatrix(0.025f) will have 1:20 cubes.
// CreateScaleMatrix(0.5f) and CreateScaleMatrix(0.02f) will have 1:25 cubes.
// CreateScaleMatrix(1.f) and CreateScaleMatrix(0.5f) will have 1:2 cubes.
// NOTE: do not forget any dots (1.f etc.), even if there are no numbers after the dot.
// NOTE: 1:20 and more doesn't look beautiful anymore, the sides of cubes start flickering. Stay simple!
param.matrix = sightMat;
//idk
renderer.AddModel(sightModel1, param);
//renders model