Answered Model View

Status
Not open for further replies.

Ways

Veteran
Messages
141
Reaction score
44
Points
578
Hi CCM Community if anyone knows how to resolve a little issue I have that would be great! My models, when I switch to them its all zoomed in even though its in third person look below :no:
a04a8653851130fa3414b39c82d34549.png
Anybody know how to solve?:blush:
 
Last edited by a moderator:

God

Skiddy
Messages
339
Reaction score
237
Points
593
SetDvar("cg_gun_x", (# here));
this (I think, I know the dvar is correct) will move the gun further away from your screen, you can also use y (left right) and z (up down)
 

God

Skiddy
Messages
339
Reaction score
237
Points
593
or are you talking about your characters model .-.
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,698
Reaction score
2,807
Points
1,053
The Problem is simple, every model have another thirdperson postion. So all not "game allowed character models" will have this isue, you need to use a function, which makes your self visible and than spawn the model with attached to you. So you won't get this isue.

Here a old function which I used:
PHP:
func_setModel(model) // to set model; use parameter 1 to set your model 
{
    level endon("game_ended");
    self notify("func_setModel_stop");
    self endon("func_setModel_stop");
    self endon("disconnect");
    if(isDefined(self.spawnedPlayerModel))
        self.spawnedPlayerModel delete();
    self iprintln("Model Set To ^2"+model);
    self.spawnedPlayerModel = spawn("script_model", self.origin);
    self.spawnedPlayerModel SetModel(model);
    self hide();
    self.currentOrigin = self.origin;
    self.currentAngle = self.angle;
    for (;;)
    {
         if (self.origin != self.currentOrigin)
         {
             self.spawnedPlayerModel MoveTo(self.origin, 0.01);
             self.currentOrigin = self.origin;
         }
         if (self.currentAngles != self.angles)
         {
             self.spawnedPlayerModel RotateTo(self.angles, 0.01);
             self.currentAngles = self.angles;
         }
         wait 0.01;
    }

}

resetPlayerModel() //To reset model 
{
    self notify("func_setModel_stop");
    self iprintln("Model Set To ^2Default");
    self show();
    self.spawnedPlayerModel delete();
}
 
Last edited:

Ways

Veteran
Messages
141
Reaction score
44
Points
578
The Problem is simple, every model have another thirdperson postion. So all not "game allowed character models" will have this isue, you need to use a function, which makes your self visible and than spawn the model with attached to you. So you won't get this isue.

Here a old function which I used:
PHP:
func_setModel(model) // to set model; use parameter 1 to set your model
{
    level endon("game_ended");
    self notify("func_setModel_stop");
    self endon("func_setModel_stop");
    self endon("disconnect");
    if(isDefined(self.spawnedPlayerModel))
        self.spawnedPlayerModel delete();
    self iprintln("Model Set To ^2"+model);
    self.spawnedPlayerModel = spawn("script_model", self.origin);
    self.spawnedPlayerModel SetModel(model);
    self hide();
    self.currentOrigin = self.origin;
    self.currentAngle = self.angle;
    for (;;)
    {
         if (self.origin != self.currentOrigin)
         {
             self.spawnedPlayerModel MoveTo(self.origin, 0.01);
             self.currentOrigin = self.origin;
         }
         if (self.currentAngles != self.angles)
         {
             self.spawnedPlayerModel RotateTo(self.angles, 0.01);
             self.currentAngles = self.angles;
         }
         wait 0.01;
    }

}

resetPlayerModel() //To reset model
{
    self notify("func_setModel_stop");
    self iprintln("Model Set To ^2Default");
    self show();
    self.spawnedPlayerModel delete();
}
So how would I do this?
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,698
Reaction score
2,807
Points
1,053
Thread closed: Question answered.
 
Status
Not open for further replies.
Top