Jump to content
  • Advertisement
Sign in to follow this  

Matrix Scaling

This topic is 3661 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

Hi, Using vb.net 2003 dx9.0c I'm trying to scale a matrix with time but I want to slowly scale it up then slowly scale it back down. I can scale it up quick with this code,I'm just real stuck on trying to get to just keep going up and down. Public Sub ScaleMatrix(ByVal elapsedtime As Single) Dim scale As Single = Matrix1.M11 Dim scale1 As Single = Matrix1.M22 Dim scale2 As Single = Matrix1.M33 scale *= 1.2 + elapsedtime scale1 *= 1.2 + elapsedtime scale2 *= 1.2 + elapsedtime Matrix1.Scale(scale, scale1, scale2) End Sub Thanks Steve

Share this post

Link to post
Share on other sites
Hi Steve

If you want to scale it down, the value should not be higher than 1.0. Any value higher than 1.0 will scale the model up. Any value lower than 1.0 will scale it down.

Hope that helps.

Share this post

Link to post
Share on other sites
I was actually looking for a way to
scale up slowly than scale down slowly.

I want it just run by itself without
input from a key or anything.

What I have posted will just disappear on me
if I just run it,I know it will work because
I used a key to test, and that is just scaling up.

I want to go up a little and then back down.

I think I can use the Math.Cos to get it
to go up and down.

I'm just having trouble implementing it.


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!