View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 24.06.2012, 03:50Posts: 22 Likes: 0
 

 Post Topic: [CryMono] View problems
PostPosted 11.07.2012, 19:56 
A View is like a camera and when you start the editor for example a view is automatically created. Am I right? If so why when I put the following code bellow inside of an entity the view is still in the (0,0,0) ?


protected override void OnStartGame()
{
cameraView = View.Active;

this.Position = new Vec3(ghost.Position.X, ghost.Position.Y - 15, ghost.Position.Z + 12);

Quat quant = new Quat();
quant = Quat.CreateRotationXYZ(new Vec3(Math.DegreesToRadians(-57), Math.DegreesToRadians(0.1F), Math.DegreesToRadians(0.1F)));

this.Rotation = quant;

this.cameraView.Position = this.Position;
this.cameraView.Rotation = this.Rotation;

this.cameraView.FieldOfView = Math.DegreesToRadians(50);
}

  Beginner BeginnerMember since: 24.06.2012, 03:50Posts: 22 Likes: 0
 

 Post Topic: Re: [CryMono] View problems
PostPosted 11.07.2012, 20:46 
CryMono support any camera implementation yet?
User avatar   Uber Modder Uber ModderMember since: 19.03.2009, 12:21Posts: 1916Location: SwedenStatus: Online Likes: 9
 

 Post Topic: Re: [CryMono] View problems
PostPosted 13.07.2012, 15:01 
To ensure that the view works as it should, you should re-initialize it in a way similar to what you provided, when the player is "spawned" in GameRules.OnClientEnteredGame.

How is your player declared and created?