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?
1
Re: camera move
Posted by Stadric on Fri Aug 11th at 7:29pm 2006
Posted by Stadric on Fri Aug 11th at 7:29pm 2006
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.
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
As I Lay Dying
Re: camera move
Posted by master_yoer on Sat Aug 12th at 12:57am 2006
Posted by master_yoer on Sat Aug 12th at 12:57am 2006
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
" SRC="images/smiles/icon_smile.gif">
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!
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
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 at 1:44am 2006
Posted by Stadric on Sat Aug 12th at 1:44am 2006
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.
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
As I Lay Dying
Re: camera move
Posted by master_yoer on Sat Aug 12th at 1:53am 2006
Posted by master_yoer on Sat Aug 12th at 1:53am 2006
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 at 5:20pm 2006

DrGlass
member
1825 posts
293 snarkmarks
Registered: Dec 12th 2004
Location: USA
Occupation: 2D/3D digital artist
Posted by DrGlass on Sat Aug 12th at 5:20pm 2006
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.
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.
DrGlass
member
1825 posts
293 snarkmarks
Registered: Dec 12th 2004
Location: USA
Occupation: 2D/3D digital artist
Re: camera move
Posted by master_yoer on Sat Aug 12th at 6:03pm 2006
Posted by master_yoer on Sat Aug 12th at 6:03pm 2006
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 at 8:39pm 2006

DrGlass
member
1825 posts
293 snarkmarks
Registered: Dec 12th 2004
Location: USA
Occupation: 2D/3D digital artist
Posted by DrGlass on Sat Aug 12th at 8:39pm 2006
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.
DrGlass
member
1825 posts
293 snarkmarks
Registered: Dec 12th 2004
Location: USA
Occupation: 2D/3D digital artist
Re: camera move
Posted by Dark_Kilauea on Sat Aug 12th at 9:20pm 2006

Dark_Kilauea
member
629 posts
93 snarkmarks
Registered: Apr 15th 2005
Location: USA
Occupation: Fast Food
Posted by Dark_Kilauea on Sat Aug 12th at 9:20pm 2006
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
member
629 posts
93 snarkmarks
Registered: Apr 15th 2005
Location: USA

Occupation: Fast Food
Re: camera move
Posted by Stadric on Sun Aug 13th at 12:16am 2006
Posted by Stadric on Sun Aug 13th at 12:16am 2006
And set it to be debris.
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
As I Lay Dying
Re: camera move
Posted by master_yoer on Sun Aug 13th at 3:29am 2006
Posted by master_yoer on Sun Aug 13th at 3:29am 2006
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.
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 at 5:17am 2006

DrGlass
member
1825 posts
293 snarkmarks
Registered: Dec 12th 2004
Location: USA
Occupation: 2D/3D digital artist
Posted by DrGlass on Sun Aug 13th at 5:17am 2006
check out the trainstation map in your SDK, they layer monitors to give a great screen effect.
DrGlass
member
1825 posts
293 snarkmarks
Registered: Dec 12th 2004
Location: USA
Occupation: 2D/3D digital artist
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0128 seconds.

Snarkpit v6.1.0 created this page in 0.0128 seconds.

