Making an actor support an other actor?

I want to make a game where an actor has two legs (that can spin on command) that support and move the main actor. I set the legs position to the main actor's x. But since I added gravity, when the actor is supposed to stand, it just falls till the main actor hits the floor instead of standing on the legs that are connected to the actor. I know why this happens, but i don't know how to fix it. It happens because the legs are set to always stay at the main actors x. So when it falls, even though the legs touch the ground, it stays at the main actors x. So it stops falling when the main actor hits the ground instead of when the legs hit the ground.
I hope this makes sense to you, and if you do understand it and know how to fix it, then please help me.
Thank you.

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2013
    I'm confused because usually discussions about gravity relate to the Y position of an actor, not the X position. Can you post a screenshot or sketch (see my signature for instructions)?

    From what it sounds like, you need to turn off scene gravity and any gravity effects (usually accelerate) on the main actor and turn on gravity effects on the legs actor. Then, constrain the main actor to the legs actor's Y position (probably using an offset, but that depends on how it looks in your game).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • DinoBitDinoBit Member Posts: 23
    I'm sorry, i meant y the whole time. I followed your instructions, and it worked for most of it. Just about the only thing it didn't work for is moving the main actor. The rectangular legs can't push up the actor when turning on the ground. Do you know how to get this to work?
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    The rectangular legs can't push up the actor when turning on the ground.
    Again, even though you have a very clear picture of what you mean because you're looking at it, I have almost no idea. :-/ Can you post an image?

    Without seeing it, I would guess that once you constrain the main actor's Y position to the legs actor's Y position, it should move up when the legs move up.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.