May 23, 2012, 04:19:31 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Please report any bugs or issues that you might be encountering with the Beta in the Support System so that we can better keep track of any oustanding issues that may come up.

GameCore Support System
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Player camera control questions-  (Read 1896 times)
zknack
Full Member
***
Posts: 207


View Profile
« on: August 15, 2008, 02:57:35 PM »

Are there any good tutorials out there that may help on how to script or otherwise create
a good set of custom cameras?

I'm trying to wrap my head around camera controls- especially how one would go about adding
a camera mode that follows the player from a fixed height and angle (almost like a scrolling ultima 7/8
style isometric-esque camera).


Any suggestions, examples or whatnot on how I might be able to pull this off?

I'm really really wishing that I'd kept saved some of the camera scripts that were on the old forum-
 The current third person camera can get down right nauseating when it pulls out and back to insane
distances quickly.
Logged
Ron
Sr. Member
****
Posts: 326


View Profile
« Reply #1 on: August 15, 2008, 03:49:30 PM »

I 2nd missing the old BV forum, that was a wealth of knowledge. Hopefully it will be back in some form or archive.

This may help... using google's archive. I have been using it alot with about a 25 to 50% sucess rate. Here is what it gives for camera control - make sure you click the cache link and not the link direct to the url

http://www.google.com/search?hl=en&safe=off&rls=com.microsoft%3Aen-us%3AIE-SearchBox&rlz=1I7DAUS&q=camera+control%3A+site%3Abeyondvirtual.com&btnG=Search

Here is a typical result clicking the first cache link from above:

http://64.233.167.104/search?q=cache:MvTqRFoWnOUJ:www.beyondvirtual.com/smf/index.php/topic,1051.0.html+camera+control:+site:beyondvirtual.com&hl=en&ct=clnk&cd=1&gl=us
« Last Edit: August 15, 2008, 04:58:47 PM by Ron » Logged
VMachmedia
Newbie
*
Posts: 26


View Profile
« Reply #2 on: August 16, 2008, 04:35:03 AM »

I noticed you mention the 3rd Person view moves out to insane distances quickly, this is something we found didn't happen in Beyond Virtual but started when we moved the Interactive Framework to Game Core. This will all depend on the player script you are using but if you are using game core without the Interactive framework then look in the player script for the camera third person setup. Game Core executes Raytracing a little differently to BV and the following is a quick fix for this;

      // Cast a ray backwards so that we don't place the camera behind a wall
      float distance = cameraOffset.z;
      Vector intersect;
      Vector normal;
      object.Hide();
      if (weapons[curWeapon].visible)
      {
         weapons[curWeapon].info.Hide();
      }
      Vector rayPos = object.GetInterpMatrix().T;
      rayPos.y += cameraRayHeight;
      Object@ hitObject = object.GetWorld().RayCast( rayPos, camDir, distance, intersect, normal, false);
      
      // GAME CORE COMPATIBILIY FIX
      if(distance > cameraOffset.z)
      {
         @hitObject = null;
      }
      // --------------------------
      
      if (hitObject == null)
         distance = cameraOffset.z;

Hope the above helps.
Logged
zknack
Full Member
***
Posts: 207


View Profile
« Reply #3 on: August 19, 2008, 03:20:02 PM »

Oi,

It's now breaking the player.gsl completely :-/

I wish I could be using the interactive framework, but I've been unable to integrate my custom hud/heart bar system
(think ala Zelda and Lego games, or metroid) with it...

And my rpg community/free project is now woefully without a programmer.

I think this is one of my few dream-items for GameCore- a visual set-up for camera views/control like in many 3d applications.

Que Sera, Sera, as the saying goes.
Logged
grubert
Full Member
***
Posts: 183


Everybody is very nice, but my jacket disappeared.


View Profile WWW
« Reply #4 on: August 19, 2008, 07:24:21 PM »

I?m half way there with the test level with your ortho camera script.
Look at this (free models that may have been ripped by some, but anyways I won?t use them for anything other than this test level). Terrain and trees are mine.

 Smiley

Tomorrow I finish this sample for you, dude.
« Last Edit: August 19, 2008, 07:30:43 PM by grubert » Logged

my portfolio and weekly posting:
http://athossampaio.blogspot.com
grubert
Full Member
***
Posts: 183


Everybody is very nice, but my jacket disappeared.


View Profile WWW
« Reply #5 on: August 19, 2008, 07:28:18 PM »

I was doing the test level for you but loose a little of focus and worked on yoda?s texture. I?ve re-textured the model myslef. Hehehe.

I?ll put in the script an easy way to have a series of cameras that the player change at his will.
« Last Edit: August 19, 2008, 07:29:54 PM by grubert » Logged

my portfolio and weekly posting:
http://athossampaio.blogspot.com
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #6 on: August 20, 2008, 06:06:27 AM »

haha, "the balloon will be with you, young sky walker" Smiley

Nice, we should make a template together because you seem to be able to cook up something quickly Smiley
Logged
grubert
Full Member
***
Posts: 183


Everybody is very nice, but my jacket disappeared.


View Profile WWW
« Reply #7 on: August 20, 2008, 10:56:56 AM »

Quote
Nice, we should make a template together because you seem to be able to cook up something quickly Smiley

Yes, pixel. I was thinking here the exact same thing. I?m having an idea: After the orthographic camera stuff for znack, I?ll develop some more thing in this test level (I?ll try to give yoda his so famous paranormal powers and levitate objects or something like). Then, I?ll pass the project to you with the camera, yoda movement and paranormal power scripts, then you develop it more with your scripts, then you can pass the project to someone else, we always trying to document - or at least put comments - how things were thought and implemented.

What do you think?
Logged

my portfolio and weekly posting:
http://athossampaio.blogspot.com
zknack
Full Member
***
Posts: 207


View Profile
« Reply #8 on: August 20, 2008, 11:16:30 AM »

Looks and sounds awesome Grubert :-)

I really like the two distances you're doing thus far - and I love that you're
keeping the swapping views as requested :-)

I can make available the heart-bar system as well if anyone is interested?
It could be used from anything from a Lego-Starwars style, to a more modular
Metroid or Zelda expanding style.

I definitely hope that we can all get things like this and such pushing forward-
If programmers like Grubert keep up the awesome help and work, then this
engine will definitely dominate with some time and TLC :-)


Logged
pixel_legolas
Hero Member
*****
Posts: 786


View Profile
« Reply #9 on: August 20, 2008, 12:37:28 PM »

There is a cool old script from old BV where the camera always keeps 2 objects in view. So it adapts the distance so they always are visible Smiley I will try it soon and see if it works
Logged
hikmayan
Full Member
***
Posts: 231



View Profile
« Reply #10 on: August 21, 2008, 02:55:17 AM »

A template like you guys are talking about will be such a sweet contributions from all you guru programmers.Hopefully w/a well put together documentation,we all can learn.
Logged

You have to be in it.....to win it!
gekido
Guest
« Reply #11 on: August 25, 2008, 03:56:53 PM »

I'll see what I can do about unlocking the old forum for viewing - shouldn't be a problem i don't think.
Logged
hikmayan
Full Member
***
Posts: 231



View Profile
« Reply #12 on: August 25, 2008, 09:13:15 PM »

That will be nice. Many many goodies were posted back then;most of the info. were strickly BV stuff but very helpful.GC/BV same family basically. Wink
Logged

You have to be in it.....to win it!
grubert
Full Member
***
Posts: 183


Everybody is very nice, but my jacket disappeared.


View Profile WWW
« Reply #13 on: August 27, 2008, 03:47:59 PM »

Here it is, znack. The cameraSystem in its basic form. There?s two cameras, both fixed. I?ll expand it later, if I have time this week.

I?ll host the test project somewhere, than I post the link to it here also.
« Last Edit: August 27, 2008, 05:36:39 PM by grubert » Logged

my portfolio and weekly posting:
http://athossampaio.blogspot.com
grubert
Full Member
***
Posts: 183


Everybody is very nice, but my jacket disappeared.


View Profile WWW
« Reply #14 on: August 27, 2008, 03:58:26 PM »

Here?s the example project, in its current state.

http://w17.easy-share.com/1701364350.html

I should advice who download that the assets on it should not be taken to be used elsewhere, specially in comercial projects.
But the scripts and its basic ideas, feel free to use.
The yoda model and some props are not mine. I?ve picked them up in a free assets site just to put this test level together. Use it just for learning or donwload it from the site too.


Cheers.

Ah: if you read the cameraSystem.gsl script and understand it, it?s easy to expand it with lots of other cameras. This way, all of them will be available for your other projects, or at least for rapid testing levels.

And the good thing is:

they won?t be inside your character controller script, so it won?t get longer, more cluttered or more complex to read. They stay in a separate file (cameraSystem.gsl).
« Last Edit: August 27, 2008, 04:02:37 PM by grubert » Logged

my portfolio and weekly posting:
http://athossampaio.blogspot.com
Pages: [1] 2
  Print  
 
Jump to:  

 
Powered by MySQL Powered by PHP bluBlur Skin © 2006, hbSkins
Powered by SMF 1.1.14 | SMF © 2006-2011, Simple Machines LLC
Valid XHTML 1.0! Valid CSS!