Crystal Space
Welcome, Guest. Please login or register.
October 01, 2014, 01:19:38 am

Login with username, password and session length
Search:     Advanced search
9020 Posts in 2053 Topics by 8556 Members
Latest Member: Boshyeng
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Associate Projects / CEL Discussion / Re: CEL Mouselook - 1st Person on: February 06, 2006, 09:48:19 pm
well at least in Freelook mode the Yaw of the camera is independent from the character

Code:
void CAFreeLook::DoCameraCalculations (const csTicks elapsedTicks,
  const csVector3& actor_pos, const csVector3& actor_eye,
  const float actor_yrot)
{
  parent->SetTarget (actor_eye);
  parent->EnsureCameraDistance ();
  parent->CalculatePositionFromYawPitchRoll ();
}

By commenting out some line you can unlink Camera Yaw from the player in other modes as well
Code:
void CAThirdPerson::DoCameraCalculations (const csTicks elapsedTicks,
  const csVector3& actor_pos, const csVector3& actor_eye,
  const float actor_yrot)
{
  parent->SetTarget (actor_eye);
  // Comment out line below
  // parent->SetYaw (actor_yrot);
  parent->CalculatePositionFromYawPitchRoll ();
}

so this parent->SetYaw (actor_yrot); connects the camera with the player mesh why MoveYaw doesn't work on all modes

(all things referring to cel/plugins/propclass/defcam/defcam.cpp)
2  Associate Projects / CEL Discussion / Re: CEL Mouselook - 1st Person on: February 05, 2006, 11:01:42 pm
Hm ... constant velocity could maybe be achieved like

Fetch Some StringID ...
Code:
id_paramvalue = pl->FetchStringID ("cel.parameter.value");


"camera_rotate" is bound to "mousex_centered"
Code:
pcinput->Bind ("mousex_centered", "camera_rotate");


If the mouse moves away from the center the offset is a float you can get as shown below
(The code comes into the SendMessage Function of your Behaviour Type of course)

Code:
  else if (msg_id == id_pccommandinput_camera_rotate)
  {
    if(params->GetParameter(id_paramvalue)->value.f > 0)
    {
      pccamera->MoveYaw(0.0175f);
    }
    else if(params->GetParameter(id_paramvalue)->value.f < 0)
    {
      pccamera->MoveYaw(-0.0175f);
    }
  }

So the idea is that if the offset of the mouse to the center is positive we rotate into one direction with constant velocity and the other way round.

Hope this helps somehow ... or is at least understandable Wink

to see the code in action you can get the oOC code
Code:
cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/ocmod checkout ooc

our solution to this problem can be found in src/ooc.cpp and src/behaviour/be_player.cpp
3  Crystal Space Projects / Project Discussion / Open Outcast: looking for 2d/3d artists on: February 05, 2006, 10:43:19 pm
Hi everybody!

To describe our project in a few words:
The Open Outcast project tries to create an inofficial successor of Outcast because the official one, Outcast 2, was canceled. The game is based on CEL/CS and should be portable and free for everybody. It's a non-commercial project for all the people who were disappointed when Outcast 2 was finally canceled and everybody who likes adventure/action games with good storyline and much freedom (nonlinear gameplay).

IT IS A SINGLEPLAYER GAME ^^

If you know the original Outcast game you maybe remember the huge regions, big cities and impressive wildlife (it was 1999 back then!)

While our coding team is advancing pretty well at the moment we're looking for 2d/3d artists.

The vacant jobs are mainly leveldesign/texture creation and conceptual art.
So if you can handle 3dsmax/Blender or some graphics program to create 2D art we'd be happy to hear from you

Feel free to visit us at www.openoutcast.de
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.696 seconds with 17 queries.