![]() |
|
|
|
#1
|
|||
|
|||
|
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])
|
|
#2
|
|||
|
|||
|
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 |
![]() |
| Tags |
| avatar, climp, collision, ramp |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Avatar Material Problem | Erikvdb | Vizard | 1 | 03-04-2014 04:46 AM |
| Unexpected Avatar lookAt() behavior when using yield statements | chris2307 | Vizard | 2 | 12-17-2013 03:58 AM |
| .osg biped avatar problem | alvinadi | Vizard | 3 | 12-20-2011 11:29 AM |
| Avatar speaking problem | Uttama_vizard | Vizard | 4 | 03-23-2009 12:29 PM |
| Problem with letting an avatar face towards another avatar | ghazanfar | Vizard | 2 | 03-21-2007 03:30 AM |