This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > VRML > July 2004 > Viewpoint Switching help





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Viewpoint Switching help
Mark Needham

2004-07-20, 10:51 pm

Help.

I'm trying to implement a switch in a VRML world that activates a door
somewhere else. When the user hits the switch I want to change the viewpoint
to show the door opening and then return the user to his/her current
location.

I've got the switching working, but what seems to happen is when the
original viewpoint is selected after the door opens the viewpoint resets so
that the user gets put back at the point when the world started and not the
location where the user clicked the switch.

This is for a 3d game :-

http://www.timeref.com/3dadv.htm

Can anyone help?
Thanks in advance

Mark Needham
---------------------------------------------------------------
for Medieval History:

http://www.timeref.com


Jeremy Pitten

2004-07-20, 10:51 pm

I think you need to update the position and orientation of the current
viewpoint using the coordinates read from a ProximitySensor, then switch to
the door viewpoint, then when you switch back to the 'current' viewpoint you
should be back at the click position rather than the world start position.
Google ProximitySensor + Viewpoint to see how the 2 nodes types can be used
to update/create viewpoints.

"Mark Needham" <mneedham@btinternet.com> wrote in message
news:ccumvc$j4c$1@titan.btinternet.com...
> Help.
>
> I'm trying to implement a switch in a VRML world that activates a door
> somewhere else. When the user hits the switch I want to change the

viewpoint
> to show the door opening and then return the user to his/her current
> location.
>
> I've got the switching working, but what seems to happen is when the
> original viewpoint is selected after the door opens the viewpoint resets

so
> that the user gets put back at the point when the world started and not

the
> location where the user clicked the switch.
>
> This is for a 3d game :-
>
> http://www.timeref.com/3dadv.htm
>
> Can anyone help?
> Thanks in advance
>
> Mark Needham
> ---------------------------------------------------------------
> for Medieval History:
>
> http://www.timeref.com
>
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews