0
$\begingroup$

I'm using Blender to develop game animations. I have an animation that I want to attach hit boxes too. I then want to set boolean on/off values on keyframes the hit boxes are active and read this in game at run time.

Heres an example punch animation with hitbox attached to the hand bone.

enter image description here

On the last keyframe I'd like to set the hitbox to active. I thought I could use 'custom properties' for this. e.g. give the box a custom property of 'active' and then set it to 1.

I am using 'actions' to manage many separate animations. However it seems custom properties are not compatible with actions?

I'm confused because because the UI for the inserting key frames explicitly has a "Location, Rotation, Scale & Custom Poperties" option.

enter image description here

It appears that there is also a "custom properties" panel within the action editor :

enter image description here

This panel doesn't seem to respect the action time line and is always fixed to a value.

I've also tried adding the property to the armature itself

enter image description here

This doesn't get captured by the "Location, Rotation, Scale & Custom Poperties" option." insert.

I'm really just wondering exactly what custom properties the "Location, Rotation, Scale & Custom Poperties" insert option captures...

$\endgroup$
3
  • $\begingroup$ Don't know whether this YT tutorial will help? $\endgroup$
    – John Eason
    Jun 20, 2023 at 22:41
  • $\begingroup$ I am not sure why you want to create a custom property to animate the activation of a hitbox. Wouldn't that be handled in the game engine anyway? $\endgroup$
    – Lauloque
    Jun 20, 2023 at 22:47
  • $\begingroup$ @L0Lock I want to use blender as the source of truth the game engine doesn't have an editor. I don't want to manually code up hitbox and frame data. $\endgroup$
    – kevzettler
    Jun 21, 2023 at 0:05

2 Answers 2

1
$\begingroup$

AFAIK right now, actions contain only keyframes from pose bones. So if you want to store custom properties' animation in an action, you need to create that custom property on a bone of the same armature.

For example, go in pose mode, select your hand bone, and got in Properties Editor > Bone Data tab > Custom Properties and create yours here:

enter image description here

This way, any animation on that custom property will be stored in the same action alongside the bones' other properties.

enter image description here

$\endgroup$
-1
$\begingroup$

Hover mouse cursor over the value slider and press I. It will create a keyframe

enter image description here

$\endgroup$
1
  • $\begingroup$ This method binds the key frames to a global time line and not the individual actions. This means if I set this key frame in one action it will also be unexpectedly set in the other actions. $\endgroup$
    – kevzettler
    Jun 21, 2023 at 0:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .