Jump to content
  • Advertisement
Sign in to follow this  
Tiddlypeeps

Squashing and Image

This topic is 2901 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it possible to squash a 2D texture along a diagonal axis?

I have an image of a bubble that I want to squash when it hits another bubble, I can scale the X and Y axis no bother so its fine for horizontal or vertical collisions. But if the bubbles collide at any sort of angle I cant find a way to squash the image into an oval shape. I can't rotate the texture because their are obvious marks on it and it wouldn't look right.

Anyone any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Assuming you can modify the geometry to which the texture is attached, you can just create a transform matrix that will scale the geometry along an arbitrary axis. (Post back if you need details on how to do this.)

Share this post


Link to post
Share on other sites
The shape of the geometry the texture is attached to has to be a regular box. I'm pretty sure this isn't possible, i just said id ask just in case.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tiddlypeeps
The shape of the geometry the texture is attached to has to be a regular box. I'm pretty sure this isn't possible, i just said id ask just in case.
What API are you using for graphics?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!