Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert an SFRotation orientation to an SFVec3f direction
#VRML V2.0 utf8
#
# Convert an SFRotation orientation to an SFVec3f direction
#
PROTO OrientationToDirection [
eventIn SFRotation set_orientation
eventOut SFVec3f direction_changed
]{
Script {
field SFVec3f forward 0 0 -1
eventIn SFRotation set_orientation IS set_orientation
eventOut SFVec3f direction_changed IS direction_changed
directOutput TRUE
url "javascript:
function set_orientation(value){
direction_changed = value.multVec(forward);
}
"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.