Translating relative to orientation with matrices
I'm working a script that builds a world and outputs a new VRML file. I'm just doing it in Vizard so I can take advantage of the easy-to-use matrix calculation. Or so I thought...
Anyway, I need to build a road out of components that are rotated, and then translated relative to their orientation. My code looks like this: Code:
current_transform.preTrans(0, 120, 0) Code:
current_transform.getPosition() |
Vizard uses the Z-axis for forward and Y-axis for up. Changing the code to the following should give you the behavior you are wanting:
Code:
current_transform.preTrans(0, 0, 120) |
Quote:
|
All times are GMT -7. The time now is 07:16 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC