2D Viewport problem... Need your help please!!

Blitz3D Forums/Blitz3D Programming/2D Viewport problem... Need your help please!!

Kozmi(Posted 2004) [#1]
Hi All...

I am having this problem with my 2D viewports for my 3D map
editor im' designing right now. What the problem is, Is this:

I have 4 viewports... ( As most 3D map editors do!! )
Im' trying to get my "Top", "Side", "Back" view to come up
in a wireframe like 2D projection view for the 3D objects
in my maps... I want to be able to click on the 2D view of
the objects in either one of the views mentioned above
and be able to move my 3D objects in the given direction
accoreding to that of the current 2D view im' working with!
I also want to be able to show the 3D objects in the
perspective view rendered normally!! ( Textured that is!! )
all at the same time as most 3D map editors do now a days.
I would like to get my 2D views to look like that of "CShop"
or "Quill3D"... Does anybody know of any good tutorials on a matter like this, Or better yet... Maybe a code sample
to help explain some of the mystery involved here?!?

Any help on this matter would be very, very appreciated!!!

Thank's alot to All...


Kozmi(Posted 2004) [#2]
Hmmmmm....

I guess nobody knows the answer to this question!
This question has been up now for the last 15 hours and
normally somebody would of responded by now! I guess I'll
have to figure this one out on my own... Thank's anyways
to all!


Matty(Posted 2004) [#3]
I cannot help you with the issue or displaying wireframe and textured images both at the same time.

However - to move the objects within each camera view according in an intuitive way within those views is probably a little easier.

One way of doing this would be to use the function TFormPoint, to transform the objects position coordinates to those in the camera's local coordinates. Then if the mouse is moving to the left within that camera view then move the object to the left in that camera view.

So for example:
Take the objects coordinates X,Y,Z and use TFormPoint to transform these into the camera's coordinate system. Then measure the mouse movement using the "mousex/y/zSpeed" functions. If, for example, the mouse moves left, then set XNew=Transformed X value MINUS some amount. Then transform the new set of coordinates back to the world coordinates using TFormPoint again and position the entity (or object) at the new set of coordinates.


Kozmi(Posted 2004) [#4]
Ok... thanks for the info Matty...