keep object centers

I have been trying to make a game with an object that is made of 3 parts. As soon as I try to rotate a part, the center changes enough that it will not travel the same direction after that. I thought about using dloc or drot also, but can’t seem to figure out how to add those IPO curves.

Picture of model here:
http://i22.tinypic.com/352nocg.jpg

Don’t know enough about your object to answer your question.
What is the thing you are making and what is is suppose to do?
Are the three objects parented in any way?
Are the objects rotated before being parented?

I am making a model robot. I am trying to get the game engine to, when you push a button, make the arm move down and then clamp on any object in its grasp. I don’t think I parented the objects in any way. There are three objects. The base is a bunch of objects joined together including wheels and base board. The arm1 is the main arm to move up and down and arm2 is the small addition to the bigger arm to clamp down on items. The objects were rotated and I made the game engine move each part the same distance so they moved as one, but once you rotate the arm objects, their center changes and they don’t move like they used to. Is there a way to get the objects to not move their centers so their axis stay the same or maybe make an IPO curve to move it? Or do you have better suggestions?

EDIT: would having the .blend file on hand help you understand it?

Yeah, the .blend would help.

But here’s a suggestion. Try toggling the “L” (for local) beside the values in your Motion actuators (assuming that’s how you’re doing the rotation).

I have toggled to “L” (to my knowledge). here is the .blend file.
http://eyecreate.dre.am/robotics-fieldtest2-6-6-game.blend

any ideas or responses?

I haven’t downloaded it, but using armatures might solve your problems.

I have spend a short glimpse at your file.

1.) Use Empty Objects to group parts together (thats what the empty is for)
2.) Use one empty as the Parent of all your parts …
3.) don’t use sensors and actuators on every part, but on the parent empty () … every child object is copying the position/scaling and rotation from its parent
4.) any rotation/translation/scaling of a child, won’t affect the parrent, and wouldn’t change the influence (axis/direction) of the parent

Thanks all for your responses, especially rorschach, your help mostly solved my problem. My only other question is: how do you get the objects childed under the empty to detect collision with one another if dynamics is on? My parts are not doing that with each other but they collide with the box arena.

Dynamic objects that are parented are a real finnicky thing. You can try the “Compound” button if Bounds is selected, that may improve it.

the compound button didn’t make it any different. Neither did changing the bounds type. Do I have to do something to the object that it will collide into, or just the one to check for collision?

Another question,is it possible to have multiple parents or a parent to have a parent?

Parents can have parents easily, but each object can only have one parent.

okay, this should be the last question, but I was trying to do the parenting like said above, but when I went to move my object, not all the collision works. The arm, when moving, will move right through other objects. The base still acts like it should, but did parenting mess up the physics? How would I fix that? To help out anyone who is taking a look, I am attaching my current .blend file.

http://eyecreate.dre.am/robotics-fieldtest2-9-7-game.blend

Well, just a couple of observations.

Why is the camera so close? All you can see is the inside of the robot.

Do you need all the the little parts in the front empty to be separate? You have them paranted to move together, why not just joint them all with ctrl p? Selecting the axle last.

I dont know that much about the physics system. Perhaps parenting stops collision with itself?

You may have to use an ipo to run the lifter thingy up and down in stead of motion actuators. It might be easier?

You could also go through and move the center of the objects back to the center of each object.

Also, double check each object and be sure the axis match the global for all of them.

May help a little.

It seems that you have scaled some of the parts, but you have not applied the scale transformations. The physics system does not like it when you do that and parent things together.

Press “N” over a 3D viewport window to see the Transform Properties window. The section marked scale will show you the scale factors of each object. Having any numbers other than 1.0 in these fields will cause problems with the collision system.

Don’t change the values manually. You will cause the objects to revert back to their previous size. Instead, you need to apply the transformations using “Apply Scale and Rotation.” To do this, you must first clear all parent relationships by selecting each child object and pressing Alt+P (you should probably select “Clear track and keep transformation”). Once all parenting relationships have been cleared, select all of the objects and press Ctrl+A to apply scale and rotation (confirm the dialog that pops up).

If you forget to clear any of the parenting relationships, pressing Ctrl+A will apply the scale of both the child and the parent to the child, causing it to change in size, so be sure to get them all (this is what is causing the problem with the collision bounds in the game… the child is taking its own scale factor and the scale factor of the parent and applying them to the bounds).

Once you’ve applied scale and rotation, re-parent everything and the collision bounds should work correctly.

I still can’t seem to get it to do it, even after applying the scale. Not sure what’s wrong now. Some of the physics stuff was fixed, but the main robot part still doesn’t. Here’s the new file.

http://eyecreate.dre.am/robotics-fieldtest2-9-8-game.blend

I was reading on this website:
http://www.continuousphysics.com/mediawiki-1.5.8/index.php?title=Physics_Tips
that:
Dynamic objects should not have a parent. If you need to add a batch of rigid bodies, check out the addObject2.blend demo, it uses the ‘instantAddObject’ on the AddObjectActuator.
would what it suggests be the best method for this project? I want to get this working, but I also don’t want to rewrite it many times over.