WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-26-2018, 03:58 PM
hannahapz hannahapz is offline
Member
 
Join Date: Apr 2018
Posts: 22
Here is the code AFTER I've created a list of positions. Here I create an array of 3D cars:

Quote:
obs_cars_array = []
for c_set in obs_pos: # for every coordinate set in the list of positions
obs_car = viz.add('mini.osg') # assign a car avatar
obs_car.setPosition([c_set[0], 0.8, c_set[1]]) # set the position of each car avatar
obs_cars_total.append(obs_car) # create array of 3D car objects
Then I create a sensor and target within same block of code:

Quote:
obs_car_target = vizproximity.Target(obs_car) # make each car a target
manager.addTarget(obs_car_target) # add it to the target manager
sensor = vizproximity.addBoundingSphereSensor(obs_car,scale =1) # make same car a sensor
manager.addSensor(sensor) # update sensor manager
I need to find a solution that will help me prevent any of the cars in the array from getting too close to another another.
Reply With Quote
 


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
Picking up Vizard Objects on mouse down with collisions pwsnow Vizard 2 09-17-2012 02:02 AM
Trouble picking text3d objects Salvar Vizard 4 12-01-2010 03:07 PM
static or dynamic objects shahramy Vizard 2 11-10-2010 12:32 AM
Semi-circle array containing target and distractor objects ptjt255 Vizard 3 08-04-2009 03:09 AM
Could not find plugin to load objects... halley Vizard 1 05-30-2006 11:01 AM


All times are GMT -7. The time now is 12:06 PM.


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