-Advanced Parenting Question-

Here’s something I’ve been trying to work out for a while now, but haven’t been able to do properly in the GE. I’ll do a brief explanation (ok, its not that brief… :no:) and then explain the main issue im having.


Basically you just need to imagine that your a character whos walking around in a hangar on a space station or something. This hangar has artificial gravity. This part is easy enough to do in the BGE…

But inside the hangar ur in theres a small ship. When u enter the small ship you become a ‘child’ of this ship. You can then start the ship and start hovering in the hangar (still being effected by the space stations artificial gravity). And finally you can fly out the hanger doors, into the zero gravity vaccume of space (perhaps gravity is turned off once you trigger something by exiting the station, easy enough to do).

While ur traveling through space in this smaller ship you can get up out of the pilots seat and walk around the ship still, and even though the ship is moving around, and you remain stationary (relative to the ship)

And then of course after landing and exiting you are no longer the child of the ship, but again ur the ‘child object’ of the overall station.


Its nearly 1am over here in Australia, so i hope that made sense…

Ive done a small demo of this (ill upload the .blend sometime when i can)

The fundamental problem is not in the parenting, the new parent actuator makes this very easy (not to mention using python) but the main issue is that when the character object becomes the child of the smaller ship, it looses its rigid body properties and just ‘floats’, parented to the ship. This would make it impossible to be able to walk around inside the ship normally as it flys through space.

If anyone has any ideas id love to hear them. Im just wondering if anyone has done anything similar to this, and can potentially solve this problem… :eyebrowlift:

What about using the new constrains actuator?
As far as i’ve seen, you can make your character walk over everything (spiderman style for example), this way you wouldn’t need anmyore the parrent actuator.
The problem of the constrain is that if the character jumps when on the ship that is in movement, the ship will continue without the character (this is logical but maybe you don’t want this XD).

Hmmmm

That sounds like it could work. I could just disable jump while your on the ship. It wouldnt be needed anyway.

So the constraint actuator can do this? Ive messed around with it a little, getting things to have limited rotation (like the camera in a fps view for example).

I didnt know it could do something like what ur suggesting though CloudGL?

Also would this work when the ship pitches up or down? The character would be effected similar to a jump i guess? The thing is that the ship would fly in 3D space, so it would need to be able to rotate on all axies etc.

Her I post a example, based on a file made by… Ben I guess, can’t remember well.
Here I added only a rotating cube that you can climb being on movement, kind of tricky tough.

Edit: Lol, just realized, you could also set the friction really high, so went the space ship goes away, the character stays stuck on the floor, then move him using linV and not force XD. But this will work only if the ship and the station moves on the XY plane and rotates only on the Z axys :stuck_out_tongue:

Attachments

slidingProblem247servo.blend (530 KB)