Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Other Viewpoint Software    Accessing MTSCamera through VETScript

Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
OK guys, please help me on this, I've been stumped for almost 3 days on this problem.

Is it possible to access the default MTSCamera properties (translate, rotate, orbit, etc.) through VETScript?
I've tried several possible combination with no avail:
alert(MTSCamera); == MtsRuntimeCamera
alert(MTSCamera.Translate); == undefined
alert(MtsRuntimeCamera); == MtsRuntimeCamera
alert(MtsRuntimeCamera.Translate); == undefined
alert(MtsRuntimeCamera.Translation); == undefined
alert(MTSCamera.MtsRuntimeCamera); == undefined (???)
alert(MTSInstance.MtsRuntimeCamera); == undefined

not to mention that on several occasions, a certain tag combination only results in a "disappearing scene" act, with me getting a blank viewpoint viewpoint...

- Greg -
 
Posts: 13 | Registered: July 17, 2005Reply With QuoteEdit or Delete MessageReport This Post
EnIgMaTiCScOrPioN
Member
Picture of e_phoenix13
Posted Hide Post
Hi !!

Try this....

alert(MTSCamera.rot_);
OR
alert(MTSCamera.rot_.x);

Should work.

Cheers,

Anup
 
Posts: 557 | Location: India | Registered: February 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
Nope, your answer did not work, the script didn't compile.

From what I gather, the script could not access MTSCamera at all (where is MTSDebugger anyway???) since a simple alert('test: ' + MTSCamera.rot_) would not work.

Anyway, I found a workaround. To do manual camera animation through VETScript, access the camera through MTSScene, use crot property for camera rotation, ctra for camera transform/translation, and cdst for camera distance from pivot.

ie. MTSScene.crot.x would return the camera rotation around the x axis, etc.

Dear Dev Team,
What I want to ask is...

<!-- ___ begin rant-fume-flame ___ -->

why can't I access MTSCamera properties, what the hell is this property doing there, and why don't they appear ANYWHERE in the documentation???

In short, where the hell is the related properties (short notation) listing in the documentation??? The reference page USED to have them, albeit incompleteness, now they're totally gone Frown

This simple thing can be done in 1 MINUTE IF ONLY THE DOCUMENTATION IS COMPLETE ENOUGH TO AT LEAST LIST THEM!

Don't give me the "Please use Enliven" crap line, you know well enough that Enliven is barely enough to do ANY advanced animation jobs, hell, I can't even import a .tga complete with its transparency intact.

<!-- ___ end rant-fume-flame ___ -->

Seriously, please increase the documentation quality. VETScript is a very big leap in your software quality, as it opens up a lot of possibilities, especially to scripter/programer like myself who hates fiddling around with arcane XML stuff. But how can we do anything if there's not even a single complete script reference in this planet?

My suggestion is:
- A totally separate reference web page for VETScript.
- A complete list and description of each and every object and their properties, a sample code is a plus.
- A list of every Javascript objects and/or methods VETScript support, a description is a plus.
- Everything is arranged in a hierarchial format.

- Greg -
 
Posts: 13 | Registered: July 17, 2005Reply With QuoteEdit or Delete MessageReport This Post
EnIgMaTiCScOrPioN
Member
Picture of e_phoenix13
Posted Hide Post
Hi !!

See attachment. When this works for me, why not you Smile....


Cheers,

Anup

Zip/GZ archiveGregorius.zip (8 KB, 26 downloads)
 
Posts: 557 | Location: India | Registered: February 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
Member
Posted Hide Post
That's weird then, because it doesn't...
It either gave me erratic numbers (huge numbers like -4900, -4900, -4900) or it doesn't work at all.
Any ideas? Frown
 
Posts: 13 | Registered: July 17, 2005Reply With QuoteEdit or Delete MessageReport This Post
EnIgMaTiCScOrPioN
Member
Picture of e_phoenix13
Posted Hide Post
Hi !!

Check the following:

1)
<MTSScene Version="330">

The Scene version should be 330

2)
<MTSTimeElem Type="VETScriptInterpreter" />

The VETScript Interpreter

3) Are you having the latest 330 player installed?

4) Are you using the latest MTS3Interface.js file? If not, there is a new version released. Please check the NEWS section on the home page of the Viewpoint Developer Central.

Hope this helps.


Cheers,

Anup
 
Posts: 557 | Location: India | Registered: February 12, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community  
 

Viewpoint Developer Central    Viewpoint Forums    Viewpoint Forums  Hop To Forum Categories  Other Viewpoint Software    Accessing MTSCamera through VETScript