Sign in to follow this  

Matrix Scaling

Recommended Posts

Hi, Using 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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this