WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-19-2013, 01:28 PM
AndyGuatemala AndyGuatemala is offline
Member
 
Join Date: Mar 2013
Posts: 4
Rotate viewpoint while moving

So I'm trying to make a train simulation in which the viewpoint moves forward and rotates by itself once it is close to an object.
I am able to make it turn while moving forward when I'm pressing down a key however, I can not figure out how to make it rotate smoothly without using a key. When I try using the setEuler without pressing a key, it turns however, it is not smooth at all. Any ideas on how to make it turn smoothly on its own?
Reply With Quote
  #2  
Old 03-20-2013, 01:41 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Create a spin action with the vizact.spinTo command and apply that to the viewpoint:
Code:
spinAction = vizact.spinTo(euler=[180,0,0], speed=30)
vizact.onkeydown(' ', viz.MainView.runAction, spinAction )
Reply With Quote
Reply

Tags
rotate, viewpoint

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rotate Viewpoint 360 Around Point/Object hotshotiguana Vizard 3 01-25-2012 05:36 PM
rotate around moving axis moneim230 Vizard 1 07-14-2010 09:04 AM
Moving main viewpoint when linked to PPT v-clizzin Precision Position Tracker (PPT) 1 04-20-2010 04:09 PM
viewpoint rotate bionic1 Vizard 1 01-27-2010 09:32 AM
moving viewpoint vs. translating Head_pos bailenson Vizard 5 02-01-2005 01:51 PM


All times are GMT -7. The time now is 10:25 AM.


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