Linking Objects
Hi All,
A while ago, I had a problem with headlights, whereby when I attached them to a car, I had a jagged light effect as the vehicle approached - because it was highlighting each road texture quad in turn. I have decided that the way to get over this would be to simply link a small quad that is fixed to the vehicle (offset by say 20 cm) in front, that the lights could illuminate as it moved towards the viewer. However, I am having difficulties getting the quad to link, as the euler command is not rotating it (see code) below. If anyone knows a way that I can program it to get the road quad to lay flat, that would be great. Thanks Mark Code:
road = viz.addTexture('Roadstrip3.png') |
When it comes to linking objects in vizard, you have to use the commands link.preEuler([yaw,pitch,roll]) and link.preTrans([x,y,z]) functions after creating the link instead of vehicle0.setEuler and vehicle0.setPosition before creating the link. So try this:
Code:
link = viz.link(vehicle0, roadstrip, priority=1, offset = (0, -1.2, -0.1)) |
All times are GMT -7. The time now is 08:15 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC