WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 07-16-2014, 03:32 AM
bobbin_93 bobbin_93 is offline
Join Date: Jul 2014
Posts: 4
Adding objects


I'm trying to learn how to use Vizard to design a programme for an experiment I'm carrying out.

I've got some images which I would like to add to Vizard as objects. These images are currently in Jpeg format. Does anyone know how to add these into my script?

Once they are in the script I'm also hoping to have them 'flying' at random tangents across the display screen. Is there any code that will automatically create these random tangents?

Reply With Quote
Old 07-16-2014, 05:15 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,465
You can apply the texture to a quad or other object:

The vizact library includes a number of actions (e.g. vizact.move, vizact.moveTo) that animate objects:

Press the spacebar to move the quad to a random position on X axis

import viz
import vizact
import vizinfo




quad = viz.addTexQuad(pos=[0,2,10])
texture = viz.addTexture('ball.jpg')

def moveQuad():
	randomNumber = vizact.randint(-5,5)
	move = vizact.moveTo([randomNumber,2,10],speed=1)
vizact.onkeydown(' ',moveQuad)
Reply With Quote

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
Trouble picking text3d objects Salvar Vizard 4 12-01-2010 03:07 PM
Adding Objects to all Scenes jassel41 Vizard 1 11-29-2010 02:35 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
adding new objects gina Vizard 4 11-29-2006 11:01 AM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM

All times are GMT -7. The time now is 04:49 AM.

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