GE, constraints, parented objects and collisions...


I’ve got a couple of questions about GE and what’s implemented yet or not.
Answers are maybe obvious and simple, but I searched on the forum and on the Internet, but I couldn’t find anything that precisely solved those problems:

  • first question:
    I have 3 objects: 2 of them are parented together and I can controle the parent position with the keyboard (with sensors and etc…). All my 3 objects are actors, some of them with ‘dynamics’ and ‘rigid body’ options on. What I’d like to do is to detect collisions between the child and the third object, which is a non dynamic one (it can be an actor though). The thing is that even the child is an actor, dynamic, etc… it passes throught the third one… and there is no collision at all (I can detect collisions with the parent but not with the child). When an object is parented to another, does it ‘destroys’ its actor parameters? On an other hand I can’t add a ‘collision’ sensor to the child because it seems to destroy the parent link and the child go wherever it wants to go…
    I hope this is clear enough… If not I can upload an example.
    I’d like to solve this problem without using armatures, just with a parent link :slight_smile: If someone knows how to do that…

  • second question:
    When you add constraints whitin the Blender interface between two objects (like ‘track to’ or ‘follow path’) they don’t appear to work in GE when you press ‘P’… Is this because I missed something or because those constraints are not yet implemented in the GE? (I know there are other constraints in GE) If not, do developpers have planed to add them?

Thanks in advance for your answers!

– Matt

The only constraint that I have used so far is the Rigid Body Joint Constraint. Dunno if others are implemented, but I’d guess that most of them aren’t, if any of them besides the Rigid Body Joint Constraint.

As far as I know, there are no plans to implement more constraints to the current BGE.

I though this constraint wouldn’t be implemented for GE too, but it is implemented, and it works fine for me! This solved the second problem, thanks a lot!.. and bring me to another question :o :
I’ve seen that we can disable gravity, but when there’s a collision, there are forces involved and my two objects go away… Is there’s a way to keep just collisions, but whitout anything else (resultant forces, etc…)? Or a way to disable all forces in GE, which would have the same result?
I tried combinaisons of actor buttons and I also tried dynamic options for materials (restitut, friction…) without success… even with the movement damping to 1…

In fact, the perfect thing fo me would be to disable the physics engine in GE, but to keep collisions and everything else (all sensors, scripts…)
I don’t know if it’s possible (I haven’t found anything about that too)

I’m not sure but I think you can make the actor to ghost. That let them ignore the collision

Yes, but if my object is a ghost it will go through the other one and the sensor ‘collision’ will not be called.
I want collisions to occure, but just collisions. I don’t want any forces to append on any objects (for example, I don’t want gravity, I don’t want any of the forces between two joined objects (with the rigid body joint constraint we talked earlier), I don’t want resultant collision forces, etc…)

I know I ask a lot… :D, but that would solve a lot of my issues now.
Maybe it’s just not possible…

Actually, if you make an object a ghost it will still detect collisions. I think it’s when you turn off 'collisions’in face mode that BGE won’t detect collsions.

I don’t understand exactly what your asking matmdx. Thought this might help. You could always upload your .blend. Sometimes that’s the best way.

OK, back from this WE!

Well, I’ll try to explain with an example for this third question:

  • file : example1.blend
  • There are a blue and a yellow cube. The yellow one is a ghost and the blue isn’t. When you press the ‘up key’ both of them will move till the vertical plane. What I want to do is to avoid them to go through the plane (the ghost one will go trough), to detect collision with a sensor ‘collision’, and to avoid any forces due to the collision. I have a ‘collision’ sensor on the blue one, but it will never be activated when I touch the plane… And when I stop pressing the ‘up key’ it will bounce back, which I don’t want… even if paramenters ‘Damp’ and ‘RotDamp’ are set to 1, and even if the global gravity is set to 0.

That’s why I’m looking in a way to disable all forces, but to still detect and apply collisions.
I hope this is clear enough this time! ^^

Thanks in advance!

(I’ll upload soon another example for my first question)

Here is my second example to illustrate my first question:

  • file : example2.blend
  • I’ve made two blocks of constrained objects:
  • 3 cube with the green and red ones
  • 2 cube with the blue oneBoth groups can be moved with the keyboard (up, right, left, down keys), and those keys only move the big cube in each group. All cubes are dynamics objects.
  • In the first group, I’ve set rigid body constraints between cubes, and I’ve put a ping-pong IPO on the last cube. Collisions are well detected when any of those cube hit the vertical plan, but because of the IPO, all of them move, not only the last cube in the chain…
  • In the second group, there is only a parent link between the two cubes. When you move this group till the vertical plan, the little parented blue cube will not collide with the plan… And if you add a ‘collision’ sensor on this blue cube, this one will react really eerily.

So, what I’d like to do is just to be able to link dynamic objects, to detect collision between them and the environment, to use local movement for each of them, but without any forces between them (inertia, resulting forces…) :slight_smile:

I’ve tried a lot of combinaisons of options, without any success till now…
I hope this is a little more understandable this time! ^^

Thanks for your time!

I have not looked at your files yet, but it sounds like you want to look into Compound objects.

you’re half way there, already. The Parent object will want Compound active in its Bounds selection. The Parented object that you want to make solid needs to be adjusted, tho.
Select the parented object (the one you want to make solid) and hit Alt-P and select the Clear inverse selection. The Object will shift its position. Move it back to where ever you need it (in relation to its parent object) and try it out.


Here, this .blend will be easier than an explanation. The blue cube just goes through the ground plane. The yellow cube still has some ‘bounceback’, but it’s minimal. Alternatively you could use linearV or use a raysensor to detect ‘walls’. Hope this helps.

OK, thanks to both of you for your help!

@LeftySpinhand : the compound and “clear inverse” options mostly solved my problem. There is just the fact that now collision are only detected by the parent object, not the child, but it doesn’t really matter…

@S_Cross : the trick you used to avoid bounceback is quiet interesting, I’ll look in that way to see if I can do that on any direction…

Thanks again!