WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Urgent!! Rotation (https://forum.worldviz.com/showthread.php?t=4616)

kharms 06-03-2013 03:57 PM

Urgent!! Rotation
 
Hey,
due to our university project, we have to build an impossible world. Hereby it is possible to walk on the walls. You have to imagine it like that: Rigth in front of the wall is a Trigger (position and View) which rotates the world so that you find yourself standing on the wall where you just walked against.
I'll paste the method in here so you can have a look at it. What happens is that we fall outside the room after we spinned the world twice in a different direction. The problem with spin is also, that it turns off the collision so you fall through walls if you are next to them. Does anyone know another possibility to rotate the world so that the gravity also works? Or do I have to change the parameters in setcenter()?
It is very urgent and I am really desperate.
Thanks a lot !:D

def action(self,x,y,z,Node,deg = 90):
"""This function rotates the whole world when the user walks into a trigger. The user commits the axis where to rotate about and the amount of degrees.
On default it is set on 90 degrees, but can be changed.
x,y,z sets the axis where to rotate about. If you want to rotate about a certain axis, you have to change the value to 1, otherwise it is zero
Node is the WorldNode which is the parent of every object in the world. You add the action on this node.
deg sets the amount of degrees the world will be rotated."""


Node.setCenter(viz.MainView.getPosition(mode = ABS))

Node.addAction(vizact.spin(x,y,z,deg,1))

Jeff 06-10-2013 04:10 PM

Can you post example code that reproduces the problem?

mape2k 07-03-2013 10:09 AM

Hi!

I just came across this thread by change.

Why don't you create an invisible plane underneath your real world? This would prevent you from falling, even if the rendered world is rotated.

Cheers,
Johannes


All times are GMT -7. The time now is 02:58 AM.

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