WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-06-2018, 08:12 AM
hannahapz hannahapz is offline
Member
 
Join Date: Apr 2018
Posts: 13
Infinite Terrain OK but Interior Car Disappearing

New to Vizard.

Trying to upload infinite terrain but my car disappears. Solution?
Code:
# Add ground
ground = viz.add('images/road.jpg', wrap = viz.REPEAT)
terrain = viz.add('InfiniteTerrain.dlc', 1, '0', 0, 30, 15000, 0.0005)
terrain.texture(ground)

# Add mini-coop
car = viz.addChild('mini.osg') 

#Keyboard interaction for car
def updatecar():
	if viz.key.isDown(viz.KEY_UP):
		view.move([0,0,MOVE_SPEED*viz.elapsed()],viz.BODY_ORI)
	if viz.key.isDown(viz.KEY_DOWN):
		view.move([0,0,-MOVE_SPEED*viz.elapsed()],viz.BODY_ORI)
	if viz.key.isDown(viz.KEY_RIGHT):
view.setEuler([TURN_SPEED*viz.elapsed(),0,0],viz.BODY_ORI,viz.REL_PARENT) # last argument = apply rotation relative to existing rotation
	if viz.key.isDown(viz.KEY_LEFT):	view.setEuler([-TURN_SPEED*viz.elapsed(),0,0],viz.BODY_ORI,viz.REL_PARENT)
		
	# now attach car to the viewpoints BODY_ORI
	car.setPosition(view.getPosition())
	car.setEuler(view.getEuler(viz.BODY_ORI))
	car.setPosition([0.35,-1.20,0.2],viz.REL_LOCAL)

# Create perpetual timer and register function to call when this timer expires
vizact.ontimer(0, updatecar)
Reply With Quote
  #2  
Old 07-25-2018, 06:30 AM
hannahapz hannahapz is offline
Member
 
Join Date: Apr 2018
Posts: 13
Fixed with viz.clip()
Reply With Quote
Reply

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
Infinite Terrain DLC Pip Vizard 0 08-29-2014 02:03 AM
Infinite Terrain slinkenauger Vizard 4 07-22-2013 10:53 AM
Near and far clipping on infinite terrain vijaykiran Vizard 2 01-21-2011 04:59 AM
Plain Infinite Terrain + Sky kovitch Vizard 1 12-23-2010 12:09 PM
generate an infinite terrain vadrian Vizard 4 09-15-2004 01:09 PM


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


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