WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   How to simulate avatar walking along a slanted surface (

Zhi 11-12-2013 02:16 PM

How to simulate avatar walking along a slanted surface
Apparently, the vizact.walkTo() method only allows the avatar to walk along a horizontal surface. If I want to simulate avatar walking along a slanted surface (such as a hill), what shall I do. Moreover, if the ground surface is uneven (i.e. with different local height), how to keep the avatar always contacting the ground surface.

Please help me! Thanks!

Jeff 11-15-2013 03:48 PM

You can pass the ground object as the height value:

import viz
import vizact

ground = viz.add('ground.osgb',euler=[0,20,0])
avatar = viz.addAvatar('vcc_male2.cfg')

walk = vizact.walkTo([0,ground,10])


Zhi 11-21-2013 09:04 AM

Thank you Jeff. It works if the ground is an imported 3D model (i.e. a .osgb file). But if I create an object on the fly (for example, using the viz.addTexQuad() method), it seems your way does not work. Is it possible to let the avatar to follow the surface of an on-the-fly object?

Jeff 11-21-2013 04:27 PM

It should still work if you add a quad. Try the following:

ground = viz.addTexQuad(scale=[50]*3,euler=[0,80,0])

All times are GMT -7. The time now is 11:22 PM.

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