WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 06-09-2010, 08:21 AM
Darkmax Darkmax is offline
Join Date: Feb 2010
Posts: 108
help with augmented reality and physics

im trying to make a simple application with physics and augmented reality.

I want just display a logo above the marker and if i roll the marker the logo will fall from the marker.

But the logo collide s little high above the plane and doesn't fall from the plane when i roll the marker.

import viz

viz.phys.enable()   # Enable physics
viz.phys.setGravity(0,-9.8/6,0) #Half Gravity

#Add ARToolkit extension
ar = viz.add('artoolkit.dle')

#Create camera using first available webcam
camera = ar.addWebCamera()

#Create marker from pattern file
marker = camera.addMatrixMarker(10,width=1000)

ground = viz.add('tut_ground.wrl')
ground.collidePlane() # Collide Plane
logo = viz.add('logo.wrl') # Add logo,ground)


def resetLogo():
	x,y,z = ground.getPosition()

vizact.onkeydown(" ",resetLogo)
Reply With Quote
Old 06-12-2010, 03:26 PM
Jeff Jeff is offline
WorldViz Team Member
Join Date: Aug 2008
Posts: 2,465
Since the origin is taken from the camera location the physics interactions can be unexpected. If you set the marker to be a global marker you'll notice that the logo will fall and collide with the ground.
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
Show Physics Shapes bloswald Vizard 3 04-07-2010 03:16 PM

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

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