WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-29-2014, 06:06 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Here's an example where the wheelbarrow goes up a ramp with the viewpoint:

Code:
import viz

viz.setMultiSample(4)
viz.fov(60)
viz.go()

viz.clearcolor(viz.SLATE)
viz.addChild('ground.osgb')

viz.MainView.collision( viz.ON )
#Make gravity weaker.
viz.MainView.gravity(2)

quad = viz.addTexQuad(pos=[0,0,4],euler=[0,65,0],scale=[2,10,1],color=viz.RED)
quad2 = viz.addTexQuad(pos=[0,0,14],euler=[180,65,0],scale=[2,10,1],color=viz.RED)

wheelbarrow = viz.addChild('wheelbarrow.ive')
#Disable intersection so wheelbarrow does not collide with view
wheelbarrow.disable(viz.INTERSECTION)

wheelLink = viz.link(viz.MainView,wheelbarrow)
#move wheelbarrow to ground level
wheelLink.preTrans([0,-1.8,0])

view = viz.addView()
view.setPosition([-20,5,9])
view.setEuler([90,15,0])
window = viz.addWindow(view=view)
window.setSize([.4,.4])
window.setPosition([0,1])
Reply With Quote
  #2  
Old 07-30-2014, 01:49 AM
befl0 befl0 is offline
Member
 
Join Date: Jun 2014
Posts: 13
Hi!

this code works thanks to the viewpoint collision but if you put the wheelbarrow 2 meters in front of the view, it is possible to goes up the ramp before the viewpoint collide the ramp ?

Thanks
Reply With Quote
Reply

Tags
avatar, climp, collision, ramp

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
Avatar Material Problem Erikvdb Vizard 1 03-04-2014 03:46 AM
Unexpected Avatar lookAt() behavior when using yield statements chris2307 Vizard 2 12-17-2013 02:58 AM
.osg biped avatar problem alvinadi Vizard 3 12-20-2011 10:29 AM
Avatar speaking problem Uttama_vizard Vizard 4 03-23-2009 11:29 AM
Problem with letting an avatar face towards another avatar ghazanfar Vizard 2 03-21-2007 02:30 AM


All times are GMT -7. The time now is 01:55 PM.


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