WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Problems creating a mirror (https://forum.worldviz.com/showthread.php?t=2480)

Josh 01-28-2010 11:34 AM

Problems creating a mirror
 
Hi all

I'm trying to create a mirror. I use the example script from http://kb.worldviz.com/articles/243 but I have problems to adapt it to my needs.

I wanted to use my own world (created in 3DSMax), but the script does horrible things to my world!

If anyone would download the stuff and test it for me and maybe correct it, I would be very happy.

http://rapidshare.com/files/342545625/Mirror.zip

The script has the addMirror() function commented out (the last line in the script); uncomment it to see what happens.

Thank you very much for help, I need this for my bachelor assignment.
Josh

Josh 01-28-2010 11:49 AM

So far I got it to work using the following code:

Code:

mirrorsurface = viz.addTexQuad()
mirrorsurface.scale(.3,.25,.6)
mirrorsurface.setPosition(0,1.8,1.2)
mirrorsurfacerotation = [0,0,0] #rotation around the Z,Y,X axes #changed from [90,0,0]
mirrorsurface.rotate(mirrorsurfacerotation)
m = viz.Matrix()
m.setPosition(mirrorsurface.getPosition(viz.ABS_GLOBAL))
m.setEuler(mirrorsurfacerotation[0]-180,-mirrorsurfacerotation[1], mirrorsurfacerotation[2]) #Z,X,Y
addMirror(mirrorsurface,m)

But I'd like the mirror to be on the red textured block of the world itself... How could I achieve this?

Josh 01-28-2010 12:21 PM

Hrm, it seems I can't edit or delete my own posts here?

Sad, because I proceeded with my work, solved some problems, and got another one... So I'm just attaching it here in a reply to myself.

Now I figured out how to add the mirror. But at the moment the avatar itself is not being displayed in the mirror! Why not?

http://rapidshare.com/files/342564961/Mirror.zip

Thanks a lot for help
Josh


All times are GMT -7. The time now is 01:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC