Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: VB.net and GetPosition fails in tutorial  (Read 1856 times)
dmacq
Community Member
*
Posts: 19


« on: January 20, 2006, 05:20:50 PM »

I  modified the TV3d VB tutorial #3 by adding these lines at these locations:

line 128  
Private TVCamera As TrueVision3D.TVCamera

line 163
 TVCamera = New TrueVision3D.TVCamera
        index = TVCamera.GetCameraIndex()

        TVCamera.GetPosition()

index returns 0
and then I get this error on GetPosition:
An unhandled exception of type 'System.IndexOutOfRangeException' occurred in Tutorial3.exe.

I have similar problems with GetRotation, yet TVCamera.Rotate works fine, so I think I have a valid handle to the camera.

I am ready to buy a license if I can get this to work.

Microsoft Visual Basic .NET   69457-005-9828062-18707
MS .NET Framework 1.1  Version 1.1.4322

Thanks.
Logged
Lil`Buh
Community Member
*
Posts: 60


« Reply #1 on: January 20, 2006, 05:32:11 PM »

here's the fix:

add your code AFTER line 164

TV8.Init3DWindowedMode(Picture1.Handle.ToInt32)

TVCamera = New TrueVision3D.TVCamera
index = TVCamera.GetCameraIndex()
TVCamera.GetPosition()

and it will work Smiley
Logged
dmacq
Community Member
*
Posts: 19


« Reply #2 on: January 20, 2006, 06:14:15 PM »

Quote from: "Lil`Buh"
here's the fix:

add your code AFTER line 164

TV8.Init3DWindowedMode(Picture1.Handle.ToInt32)

TVCamera = New TrueVision3D.TVCamera
index = TVCamera.GetCameraIndex()
TVCamera.GetPosition()

and it will work Smiley


That worked like a charm.

I posted this question in the general forum -before- posting in Bugs but got no satisfactory response.

I could not believe that something as elemental as getPosition did not work.

Many thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks