Jump to content

Possible to slide sprites along rotation axis?


gsilverfish

Recommended Posts

Is it possible to move a sprite so that it stays locked along its rotation axis? Maybe easiest to show what I mean with a picture (attached). You can see this "prod"-like appendage is meant to slide in and out of the piece that holds it. If it's rotated along a 90 degree increment I can place it easily, but at any other angle I have to zoom in and eyeball it. 

What I guess would work even better would be to create key frames in a closed and open position, so that I have the length and position exactly where I want it, and then copy and paste the frames for that object specifically where I want them. I tried doing this but for some reason I was not able to copy the frame data for just one sprite, I always seem to get the entire keyframe. 

Image24.png

Link to comment
Share on other sites

I figured one tricky way to do it. one bone for the forearm type thing, then a child bone on the same angle you want the slidey bit to follow, then finally a little bone on the end. You make the image of the slidey bit to this last little bone! In order to slide the image along the angle of the bone, you stretch the middle bone along its length!

IMPORTANT! You nee to right click and hold on the final little bone and torn off its inheritance of size... only leaving angle still on for inheritance.

EDIT: DARN! when tweening from key frame to key frame the stretching bone also stretches the image for the slidy bit.... to counteract this you need to add some in between keyframes for the slidey bit images itself, setting its x or y (whichever is effected back to zero) this will keep the scaling under control.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...