camera move

camera move

Re: camera move Posted by master_yoer on Fri Aug 11th 2006 at 7:23pm
master_yoer
18 posts
Posted 2006-08-11 7:23pm
18 posts 2 snarkmarks Registered: Sep 16th 2005
Alright, I tried searching and didn't find anything about it, so i'm going to go ahead and ask. Sorry if there is something similar.

I am wondering if it's possible to make a moveable camera follow an object. (In my mod, there is a key object that is constantly moving, and I want a camera to follow it so that players can find it easily looking at a monitor)

For example, the object is a rollermine, and I want a camera to follow it wherever it is (in somebodies hand, or rolling around on the ground, or sitting still), that way if somebody picks it up, somebody can look at a big projector and see exactly where the ball is at.

Is this possible at all? If not, would it be hard to implement into the source sdk at a later time when the mod starts getting coded?
Re: camera move Posted by Stadric on Fri Aug 11th 2006 at 7:29pm
Stadric
848 posts
Posted 2006-08-11 7:29pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
You can get a camera to follow a moving object, but you have to do it by parenting it to the roller mine, which can become very annoying.
You could put the camera inside of the roller mine, that might work.

For your second question, you can't get the player on screen, because there is no player model. If you're making a mod, you could add one, but I don't know how to do that. Garry's mod 10 will have a player modelm though, you could check out how Garry did it when it comes out.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: camera move Posted by master_yoer on Sat Aug 12th 2006 at 12:57am
master_yoer
18 posts
Posted 2006-08-12 12:57am
18 posts 2 snarkmarks Registered: Sep 16th 2005
So let me get this right, you just create the rollermine and the camera, and than parent the camera to the rollermine? That's it? No special entities or anything that need to be tied to the two ?

Well, I parented it, but the only thing is that it moves WITH the ball, not vertical. I was hoping it would stay upright with the ball, but if the mine rolls sthe camera also rolls and sometimes ends upside down. Very unuseful when somebody is trying to view where the ball is and the person is running upside down :smile:

I am going to have to mess with it a bit and see if I can get it. Maybe try constraining the camera.

Any other suggestions would be helpful!
Re: camera move Posted by Stadric on Sat Aug 12th 2006 at 1:44am
Stadric
848 posts
Posted 2006-08-12 1:44am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
You could combine a game_ui with a point_viewcontrol to make something like the combine binoculars. You could press e, and the viewcontrol and game_ui would turn on, then hit e again to disable it (that's what the ui is for). Point_viewcontrol can point towards something as it moves.

According to this site:
http://developer.valvesoftware.com/wiki/Game_ui
deactivating a game_ui crahses the game.

Given this information, make it timed.
Make a black screen, or a static-y screen, put a button somewhere, maybe even on the screen. OnPressed>>point_viewcontrol>>activate>>0.00 and OnPressed>>point_viewcontrol>>deactivate>>5.00.
Something like that.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: camera move Posted by master_yoer on Sat Aug 12th 2006 at 1:53am
master_yoer
18 posts
Posted 2006-08-12 1:53am
18 posts 2 snarkmarks Registered: Sep 16th 2005
Wow, that seems like a lot of work just for one thing to happen.. wow. Maybe I will get something specially coded. Some sort of special camera that doesn't rotate, but instead stays in the same rotation and follows the ball.
Re: camera move Posted by DrGlass on Sat Aug 12th 2006 at 5:20pm
DrGlass
1825 posts
Posted 2006-08-12 5:20pm
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
You mean a point_camera right? you want a camera that shows up on screen in-game? Thats easy.

make a point_camera and an info_camera_link (I think thats the name). Set all the names and such so the camera works then simply set the point_camera's parent to the object that is on the move.

You could even a little further but creating a physbox that is non solid and invisible (use the nodraw texture on it) and attach that box to the object with phys_springs then parent the camera to the physbox, with a little work you would have a nice sway to the chase cam.
Re: camera move Posted by master_yoer on Sat Aug 12th 2006 at 6:03pm
master_yoer
18 posts
Posted 2006-08-12 6:03pm
18 posts 2 snarkmarks Registered: Sep 16th 2005
That's the current method I am using, but the camera follows the model exactly. If the ball spins, the camera also spins. I'm trying to get it to stay in the same orientation, so that it doesn't rotate etc, and still follows the rollermine. It's rather confusing.
Re: camera move Posted by DrGlass on Sat Aug 12th 2006 at 8:39pm
DrGlass
1825 posts
Posted 2006-08-12 8:39pm
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
oh my, hmmm... You don't controle where the roller goes I take it? I think we are going to have to figure out a system of phyic entities to tie the camera to the mine without allowing the rotation to act on it. I'll try and check out some ideas soon.
Re: camera move Posted by Dark_Kilauea on Sat Aug 12th 2006 at 9:20pm
Dark_Kilauea
629 posts
Posted 2006-08-12 9:20pm
629 posts 123 snarkmarks Registered: Apr 15th 2005 Occupation: Fast Food Location: USA
Try a ball constrait to an invisible physbox, with has a keepupright constraint on it too. try the camera to the ball constraint. Then give the physbox a mass of .001 or something.
Dark_Kilauea
DVS Administration
http://www.dvstudio-production.com/
Re: camera move Posted by Stadric on Sun Aug 13th 2006 at 12:16am
Stadric
848 posts
Posted 2006-08-13 12:16am
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
And set it to be debris.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: camera move Posted by master_yoer on Sun Aug 13th 2006 at 3:29am
master_yoer
18 posts
Posted 2006-08-13 3:29am
18 posts 2 snarkmarks Registered: Sep 16th 2005
I think for mach-up purposes I am going to try those methods out, but once the mod is in production I think I am going to have a special camera tied to the modified rollerball directly inside the code so that when the npc_rollerball is placed, the camera is automatically activated upon it, etc. Might make things easier for creating maps and etc for the mod if I do it that way.

Thanks alot for the suggestions guys! Now I just have to find a way to make a cool two-way projector that hangs above the default arena map for the mod (Like the ones in basketball courts and etc). I know how to make the monitors etc, just not sure how I want to go about shaping the box, etc.
Re: camera move Posted by DrGlass on Sun Aug 13th 2006 at 5:17am
DrGlass
1825 posts
Posted 2006-08-13 5:17am
DrGlass
member
1825 posts 632 snarkmarks Registered: Dec 12th 2004 Occupation: 2D/3D digital artist Location: USA
check out the trainstation map in your SDK, they layer monitors to give a great screen effect.