Making an actor support an other actor?
DinoBit
Member Posts: 23
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.
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
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
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