Hi,
I believe I may have found a rather major bug in WorldViz involving gravity implementation on the view. I am obviously open to being corrected on this -- there may be something really obvious I have missed.
It appears as though if you look in a different direction when falling, it actually affects the angle of gravity!
Consider this example:
Code:
import viz, vizact
viz.go()
ground = viz.addChild('ground.osgb')
ground.setScale(10,1,10) # Make the ground a bit bigger
viz.MainView.setPosition(0,75,0) # Put me up in the air
viz.collision(viz.ON) # Turn on collision detection
def lookDown():
viz.MainView.setEuler(0,90,0, viz.HEAD_ORI)
vizact.ontimer2(2, 0, lookDown) # After 2 seconds of falling, look down
You end up falling backwards as soon as the view is changed. This does not make sense to me -- I surely shouldn't be able to change my angle of fall simply by moving my head, eyes or body. This also seems to impact Head Mounted Displays -- if you look around whilst falling it skews your drop!
If you stand on an object looking forwards, then walk straight off it, fall a bit, turn around and look down (perfectly possible to do), you actually end up getting thrown away from it as well as falling downwards!
I would appreciate any help in the matter as gravity not being 'downwards' really impacts what I am trying to do.
An additional possible bug: if you change the positional chunk of code above to
Code:
viz.MainView.setPosition(0,1000,0)
you never fall at all -- even though the ground is absolutely visible below you. I don't understand why this is? Presumably a check is made to see if the ground is below you, but the check seems to be very short (and possibly not configurable).