Action Not Working when Parented to Armature

#1

So I have a bone that is animated. It goes from one side of the level to the other on the x axis. My character’s cube is parented to the bone (ctrl+P > Bone). It has a couple z-axis only animations like a jump/fall animation. When it collides with a stationary cube, I have it set up so that it plays an action that snaps it back to the bone. The jump/fall animation works, but the snap animation does not. I am very confused as it all seems logical to my brain? Can anyone tell what I’m doing wrong? Dot blend file included below.

https://drive.google.com/file/d/1yUndIOPHD9nON_kt0ACPAKQJ0e7L6v0R/view?usp=sharing

This is for my minecart/roller-coaster level. A broken roller coaster where you have to jump over the gaps.
Thanks for helping out!

0 Likes

(The Mishaling) #2

Question: why do you need to animate the bone then parent the cube to it? Can’t you just animate the cube? :slight_smile:

0 Likes

(blenderaptor) #3

26 days later … as far as i remember, bones constraints work in BGE but not object constraints (even if animated) . So you will probably want to put/rig a bone in your cube and animate (bone constraint) that new bone rather than the box

0 Likes

#4

So I need to parent a bone to the bone and the cube to the new bone? And I haven’t been able to work on this for 28 days so you’re not late. :wink:

0 Likes

#5

@The_Mishaling It gets really tricky if I just use the cube. I have a jump animation that needs to be on top of the roller coaster animation. My character can jump at any time. If it hits one of the “rail” cubes during the jump animation, then the jump animation is interrupted and he doesn’t fall to his death. He continues riding the roller coaster. (The jump animation also includes falling should he not land back on the rails.) I was not able to figure out how to do this by layering animations on the one cube. And I’m taking a coding class, but can’t do anything yet, so I’m using the basics for now. Is there a better way to do this?

0 Likes

(- Click for resources) #6

so cube needs to move and able to jump?

character settings is the one that works, depending on what you want.
This .blend: cube moves to right, and can jump, uses physics instead of animations.

0 Likes

#7

Yeah I tried physics too, but I can’t get it to fall right. In donkey kong country, you jump up and then pretty much drop like a brick which is what I want. Everything I’ve tried with physics doesn’t get that result. You end up moving a lot while you’re falling which makes it harder to know where you’re gonna land. So I’m using an action to shape the jump and the fall a little better. Also my laptop can’t get the .blend you sent to work, but as far as I can tell, I’ve tried the basic set up you’ve got there.

0 Likes

(- Click for resources) #8

yeah sorry, adjusted it in upbge so in blender put glsl back on.

0 Likes

#9

Oh got it. What is upBGE by the way? Is it worth moving to when BGE is gone?

0 Likes

(- Click for resources) #10

upbge is better then bge, so yes if you feel like to hop over you should do it.

anyway if you want animations then:
animate the bone, not the cube.
let the cube handle the jumping.

else you get the same mess again, animation playing, you jump animation will get of track.

0 Likes

#11

Okay, I will try that. So the bone does the travelling and the cube is animated to do the jumping, correct?

0 Likes

(- Click for resources) #12

indeed. but parent the cube first to the bone, this will make sure that animation you create for the cube will be local not global, so it should move and jump nicely.

1 Like

#13

Oh. Good to know. Thanks for you advice! I’ll think about moving to upbge too. :grin:

0 Likes

(- Click for resources) #14

well do what you like, but be prepared, it can be that some things don’t work in upbge and may need some tweaking. other then that all should be fine and better.

0 Likes

#15

Oh okay. But should it be alright if I’m not doing any coding? Does it have a logic editor still?

0 Likes

(- Click for resources) #16

yup, it’s just blender but better, if you only use logic then no problem at all, most things are script based so your fine.

0 Likes

#17

Gotcha. Cool, I’ll check it out!

0 Likes

(The Mishaling) #18

Have you considered turning the cube into a ‘Character’ physics type and using the already in-built jump mechanic using the logic bricks? :slight_smile:

0 Likes

(- Click for resources) #19

i did that with the blend i adjusted for him but he doesn’t want to use physics.

0 Likes

(The Mishaling) #20

Oh okay, I’ll have a think. Thanks.

0 Likes