Please or Register to create posts and topics.

cube needs to stay parallel to the ground.

Page 1 of 2Next

Hey,

for a level I am currently working on I need to make a cube so that it can move in the xy plane, and in height, but it shouldn't move in the xz or yz plane. So in other terms: it should be parallel to the floor, but I should be able to move it up.

any idea's?

~Lp

Invisible walls? im afraid i cant give you any help other that that without knowing more details.

Image
I think in terms of boolean variables. Generally, it makes things easier.

more information:
The level is a map with multiple colored lasers. Because this is impossible I made various copies of the level, but say 1000px higher. The copy is what I call the "shadow" level. I have a shadow level for red, green and blue.

Each shadow level represents a color, and the result of the shadow map is then used in the "real" map. Which uses colored env_lasers.

The cube in the shadow level is parented to the real level, so that if you move/aim your cube in the real level, it does the same in the shadow level, which can process stuff.

The problem with the cube tripping over is that the "shadow" are normal laser cubes/reflectors thus they can influence the others when they somehow come in the wrong shadow level. So if a cube trips over say the "blue shadow cube" can go into the green shadow level, and doing things there, thus breaking the map.

To make it even harder for myself I thought It would be fun if the level has multiple floors. So you have to be able to walk up a staircase, but you cube is not allowed to trip over.

I hope that was somewhat helpful!

now im sort of retarded, and never mapped before, but how about walls that lasers can not pass trough in between each of your shadow levels? - that way you can have the lasers tip over without any effect

I don't think this has been used in portal 2 before,
Thysterectomy your cube to a phys_slideconstraInt

bruzag wrote:
now im sort of retarded, and never mapped before, but how about walls that lasers can not pass trough in between each of your shadow levels? - that way you can have the lasers tip over without any effect

that won't work because the distance needs to be exactly the same all the time, if I would allow cubes to stay on a place they will lose their position relative to the cube, so that the puzzle is broken :(

spongylover123 wrote:
I don't think this has been used in portal 2 before,
Thysterectomy your cube to a phys_slideconstraInt

I don't think that's gonna work, because I still need to move to object freely in the xy-plane, what I could do is create some sort of elevator for the cube, but that limits my level design possibilities so I'd rather not do that...

What do you think of an onpickup phys_keepupright disable, ondrop phys_keepupright enable?
that might work?

~Lp

phys_keepupright is exactly what you need. It keeps the cube all the time parallel to the ground but you can move it in any direction.

Is something like this what you are looking for?
ScpfgaKb1fk

Also, are the shadow levels identical to the actual level?

If so, logic_measure_movement is probably what you'll need. There was a script that added proper collisions to the shadowed cube, but I need to find it again.

Rand0mNumbers wrote:
Is something like this what you are looking for?
*youtube*

Also, are the shadow levels identical to the actual level?

If so, logic_measure_movement is probably what you'll need. There was a script that added proper collisions to the shadowed cube, but I need to find it again.

I'm not sure what I'm looking at :(
The shadow level is almost identical. That way I can copy the behavior of the lasers to the real level.

Skotty wrote:
phys_keepupright is exactly what you need. It keeps the cube all the time parallel to the ground but you can move it in any direction.

w00t :D

=====
Another question: is there an easy way to spawn prefabs/instances (a series of objects, linked to each other) with the press of a button? Like spawning a cube with a phys_keepupright? ;)

Page 1 of 2Next