[C3] Animate child with parent.

0 favourites
  • 5 posts
From the Asset Store
1463 files of +850 unique phrases of a cheerful female hero child for FPS, RPG, Action, Adventure, Survival, games etc.
  • Hello,

    I have been working with C3 for only a day so apologies if this is a basic question.

    So I have a humanoid character that has some basic animations such as idling and walking. I want to be able to place an object in the players hands and have that object animate with the player.

    How would I go about doing this? Firstly I thought about adding image points to my animation frames and spawning the object at that location but I realised quickly that the objects wasn't connected in anyway. I also looked into the hierarchy and added the object as a child of the player, but it looks static.

    Thanks.

  • In this case you probably need to use Pin behavior instead of the hierarchy. You can add an imagepoint to all animation frames on the parent and pin the child object to that imagepoint. You can also pin width - this should automatically mirror the child object when parent is mirrored.

    You will have to update child animation with events though.

  • Thank you. This appeared to work nicely for my idle animation which simply bounces.

    My walking animation however is a slight bounce which a rotation with multiple frames. Not all for the frames match up nicely. It would be nice if I could connect the objects on two points, do you know if this is possible?

    For now the origin of the object is connected to the player which is good for position but a second connection would allow for any rotation difference, is this possible?

    Thanks.

  • You can position the child object with events - on every tick set child position to a different image point depending on the animation played on the parent. In this case you won't need pin, or use it only to sync other properties like width or angle.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I managed to get the desired look in the end with pinning and repositioning the origin.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)