X/Y Axis Parent

I’ve been working on the mountain demo and decided to add something other than oblivion under my mountain level. I decided to use water, and to keep it from taking up too much space, I made the water bounds smaller than ocean big. To make it look right, I vertex parented it to my person. Here is the problem though: It works perfectly when you move Left, Right, Forwards, and Backwards, but when I go up or down (Like you do when you’re actually on a mountain), the water rises and floods the areas that you go up to.

Simply stating, I’m wondering if there is a simple way to parent an object on the X and Y axis of an object so that if you go Left, Right, Forwards, and Backwards it follows you, but if you were to go up or down, It would stay in the same place on the Z axis.

EDIT: I just tried putting a Z axis constraint on the water, but when I ascended, it flew off into the horizon, but it didn’t go up or down! It still doesn’t help. XD

you’re replacing me with water? :smiley:
…sounds like you need to use python, you can easily copy just the x and y positions of an object. if you don’t know/don’t want to learn python, I can write a simple script for you upon request.

Sorry about your liquid replacement. I know some python, but not enough to really write a script. I would like that, and it would greatly help. Thank you Capt Oblivion!

why was I under the mountain level anyway? XP (I never get tired of the joke^_^ )
…here’s a simple code that should do it, just plug it into an always sensor

player=g.getCurrentScene().getObjectList()["OB---"] # replace --- with the name of the object to be followed, but leave the OB and quotes
o.setPosition([pos[0], pos[1], 0]) #the 0 in the Z slot can be any height, just paste the height the water is at

You’re in my games too =]

Thank you very much Caption Oblivion. And for the record, you are surrounding my levels too.

I get around BA
pimpin’ myself all day
yo, it’s just how I roll
I’m always in control
my python scripts are boss
so pass me more l33t sauce!

…yeah, there’s a reason I don’t rap…

I can see why :wink: