|
zknack
|
 |
« 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
|
|
|
|
|
|
VMachmedia
Newbie

Posts: 26
|
 |
« 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
|
 |
« 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
|
 |
« 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.  Tomorrow I finish this sample for you, dude.
|
|
|
|
« Last Edit: August 19, 2008, 07:30:43 PM by grubert »
|
Logged
|
|
|
|
|
grubert
|
 |
« 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
|
|
|
|
|
pixel_legolas
|
 |
« Reply #6 on: August 20, 2008, 06:06:27 AM » |
|
haha, "the balloon will be with you, young sky walker"  Nice, we should make a template together because you seem to be able to cook up something quickly 
|
|
|
|
|
Logged
|
|
|
|
|
grubert
|
 |
« Reply #7 on: August 20, 2008, 10:56:56 AM » |
|
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
|
|
|
|
|
zknack
|
 |
« 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
|
 |
« 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  I will try it soon and see if it works
|
|
|
|
|
Logged
|
|
|
|
|
hikmayan
|
 |
« 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
|
 |
« 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. 
|
|
|
|
|
Logged
|
You have to be in it.....to win it!
|
|
|
|
grubert
|
 |
« 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
|
|
|
|
|
grubert
|
 |
« 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.htmlI 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
|
|
|
|
|