Restriction Up and Down movement.

Avatar
baca25
342 Posts
Posted Sep 15, 2011
I was wondering if there was a way to restrict the movement of looking up and down, when a player picks up an object. I tried to get this to work 100 different ways, but can't figure it out. I want a player to pick something up, a cube, physbox, anything, then the player can move around and look left and right, but not up and down. Can it be done?
Advertisement
Registered users don’t see ads! Register now!
Avatar
iWork925
1,080 Posts
Posted Sep 15, 2011
Replied 9 minutes later
Extremely low ceiling.
Avatar
Marise
249 Posts
Posted Sep 15, 2011
Replied 59 minutes later
Without knowing the nature of your puzzle, here is what came to my mind...

Place horizontal fizzlers above and below, so the player is forced to hold the object level to avoid fizzling it.

Avatar
baca25
342 Posts
Posted Sep 15, 2011
Replied 25 minutes later
No I can't use either of those methods, I had even tried making clips above and below a physbox, but it keeps the box from turning or it pushes the players view zoomed in on the object. I need the object and the player to stay the same distance away from each other also. I don't see how this can work, unless i can turn off the players ability to look up or down, or keep the cube from raising or lowering 100%. Anyone know if there is a console command or something that can lock the players view or something?
Avatar
Marise
249 Posts
Posted Sep 15, 2011
Replied 2 hours later
There is some kind of camera control entity. I don't know anything about it, but perhaps you could look into it and see if it works for you. And maybe someone who has used it can post some info.
Avatar
Brainstatic
219 Posts
Posted Sep 15, 2011
Replied 1 hour later
If we knew some more details about what you are trying to do here, we may be able to help you out some more. Perhaps there's an alternative method to having the player potentially be really confused when they can't look up or down. If I was suddenly unable to look up or down, I would probably try replacing the battery in my wireless mouse and then give up on the map when that didn't work.
Avatar
Vordwann
767 Posts
Posted Sep 15, 2011
Replied 11 minutes later
I know that in the final fight with wheatley, when you have to shoot the moon, your view is restrained to a very small area. Maybe this is the effect you're looking for? Decompile the map and find out what hey did.
Avatar
FelixGriffin
2,680 Posts
Posted Sep 15, 2011
Replied 3 hours later
It's a special vehicle script and a game_ui to detect mouse click. The game_ui fires an info_particle_system for the orange flash, and then starts the ending scene.
Avatar
baca25
342 Posts
Posted Sep 16, 2011
Replied 8 hours later
Well what I was trying to do was make a car. I made a physbox steering wheel, and parented a bunch of brushes to it. then parented a speed gel under the front of the car. Just as a racing thing for the start of one of my maps. It actually works pretty good, but if a player looks up or down, it ruins everything. Go flying in the air, and can toss the car, and stuff. Ohh well.
Avatar
Marise
249 Posts
Posted Sep 16, 2011
Replied 6 hours later
That sounds fun and interesting. I hope you can get it working.

You could use a track_train, but then the player would lose the freedom to drive where they like. Perhaps you could also try a clip brush that affects objects but not the player, to sort of hold the car on the ground. Basically just an invisible, horizontal clip brush right above the top of the car.

Avatar
gallardo
85 Posts
Posted Sep 16, 2011
Replied 1 hour later
You may try to disable the mouselook and bind all the movements to WASD with a gameui, but I suggest to take a look at those old tutorials that explain how to build a vehicle out of brushes. it has been done already and it's pretty easy to do.
Avatar
HMW
806 Posts
Posted Sep 19, 2011
Replied 3 days later
This sounds very similar to the situation at the beginning of the original game: you're trapped in the moving container but free to move around inside it without getting stuck in the walls, as would happen if the player was actually inside the model.

What actually happens is that the player is in a separate room, and their position is continuously recorded relative to a reference point_viewproxy. Then the player viewpoint 'camera' is positioned with the same offset relative to a 'twin' point_viewproxy that moves with the container. (Listen to the commentary track for a more thorough explanation.)

This seems to me like the perfect thing for your car idea :smile:

Advertisement
Registered users don’t see ads! Register now!
Avatar
Vordwann
767 Posts
Posted Sep 19, 2011
Replied 28 minutes later
Is that why crouching has no effect in that scene until it's over?