Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object)
Mesh Translation( computer moving object) Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Go Back  Xtreme Visual Basic Talk > > > > Mesh Translation( computer moving object)


Reply
 
Thread Tools Display Modes
  #1  
Old 01-24-2007, 02:03 PM
Akira1113 Akira1113 is offline
Freshman
 
Join Date: Dec 2006
Posts: 29
Default Mesh Translation( computer moving object)


hello, got a problem trying to get the computer to move my object around the screen. it is able to move the mesh from one vector to another but i want you to see it moving instead of dispear and reapear

using:

D3Ddev.Transform.World = Matrix.Multiply(D3Ddev.Transform.World, Matrix.Translation(x, y, z))

and

Case Keys.W
Game.z += 4
Case Keys.S
Game.z -= 4
Case Keys.A
Game.x -= 4
Case Keys.D
Game.x += 4

im able to get the effect im after by holding down a key, but if i replicate one of these in a loop, it wont move just diseaper and repear even using smaller number like 0.001.

for example i have the vector3(10,0,0)
and i want it to move slowly to vector3(50,0,0)

anyone understand what i just said or know what im trying to achive :/

thanks
Reply With Quote
  #2  
Old 01-26-2007, 03:52 PM
Akira1113 Akira1113 is offline
Freshman
 
Join Date: Dec 2006
Posts: 29
Default

no suggestions?
Reply With Quote
  #3  
Old 01-28-2007, 04:25 PM
Iceplug's Avatar
IceplugMesh Translation( computer moving object) Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

What does your loop look like? You must know that you have to have an Application.DoEvents in your loop, otherwise, you won't see anything... and you should have a Application.DoEvents in any DirectX program.

Haven't you done examples of this before going into DirectX?
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
  #4  
Old 02-03-2007, 08:12 AM
Akira1113 Akira1113 is offline
Freshman
 
Join Date: Dec 2006
Posts: 29
Default

hi ice would you be able to give any help in to how this might be done, i do have an Application.DoEvents in my app but when i puut it in the actual loop this start acting strange

my actual loop got very messy after playing about with it, cuase it had to find the equation of a straight line using the co ords and increase x and z usign that.

Do Until game.x = 10
' Application.DoEvents()
Game.x += 0.05
Loop

this for example should do nothing ?
Reply With Quote
  #5  
Old 02-04-2007, 06:17 AM
Iceplug's Avatar
IceplugMesh Translation( computer moving object) Iceplug is offline
MetaCenturion

Retired Moderator
* Guru *
 
Join Date: Aug 2001
Location: Iowa, USA
Posts: 16,583
Default

Several reasons why you need to fix that loop:

One - you cannot tell if an object moved 5/100 of a pixel on the screen. Pixel is the smallest of anything that you can see and it's pretty hard to even distinguish when something has moved one pixel (unless you're running at 640x480)

Two - moving an object 5/100 of a pixel until it gets to 10 is absurd. That's 200 movements, each with an Application.DoEvents. You're more likely to see the form refreshing and it'll be that much harder to see if the object moved that 1 pixel after 100 iterations of that loop.

Three - I just realized that you're doing DirectX. From the loop you proposed, you must be unaware that you actually have to draw the object. If you move it, you have to draw it, otherwise you won't see it move. I would have figured that you would have tried doing something like this without DirectX before you realized that - but what you have to do is move the object and then draw it. Everytime, no exceptions.
__________________

Iceplug, USN
Quadrill 1 Quadrill 2 (full) Quadrill 3 JumpCross .NET Website is ALIVE! - DL Platform Tour for VB.NET! Posting Guidelines Hint: Specify your location in your user cp profile if you want compassion!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object) Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object) Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
 
Mesh Translation( computer moving object)
Mesh Translation( computer moving object)
 
-->