In the Lua code in the SteamVR template, it is scripted that you can use the touchpad to move around inside the model. This does not work. Am I missing something or is this a bug?
I really need the ability to relocate to different positions on the level.
Here is a snippet of the code that should work but doesn't seem to do anything.
-- Move character using touch pad if Bit.band(ctrl_buttons.pressed_buttons, SteamVR.BUTTON_TOUCH) ~= 0 then move = Vector3.multiply(forward_without_pitch, ctrl_buttons.touch_axis.y) if ctrl_buttons.touch_axis.x ~= 0 then local rot = degrees_90; if ctrl_buttons.touch_axis.x > 0 then rot = -rot end local rotated_forward = Quaternion.rotate( Quaternion.axis_angle(Vector3(0, 0, 1), rot), forward_without_pitch ) move = move + Vector3.multiply(rotated_forward, math.abs(ctrl_buttons.touch_axis.x)) end end
Thanks for your help.
Solved! Go to Solution.
In the Lua code in the SteamVR template, it is scripted that you can use the touchpad to move around inside the model. This does not work. Am I missing something or is this a bug?
I really need the ability to relocate to different positions on the level.
Here is a snippet of the code that should work but doesn't seem to do anything.
-- Move character using touch pad if Bit.band(ctrl_buttons.pressed_buttons, SteamVR.BUTTON_TOUCH) ~= 0 then move = Vector3.multiply(forward_without_pitch, ctrl_buttons.touch_axis.y) if ctrl_buttons.touch_axis.x ~= 0 then local rot = degrees_90; if ctrl_buttons.touch_axis.x > 0 then rot = -rot end local rotated_forward = Quaternion.rotate( Quaternion.axis_angle(Vector3(0, 0, 1), rot), forward_without_pitch ) move = move + Vector3.multiply(rotated_forward, math.abs(ctrl_buttons.touch_axis.x)) end end
Thanks for your help.
Solved! Go to Solution.
Solved by dan.matlack. Go to Solution.
I will look into this. Sit tight.
Paul
I will look into this. Sit tight.
Paul
You can move around in the steam template however you like. You can set your input via flow, via lua or you can teleport. I recommend teleporting.
Use lua or flow to set your tracking space. You can do a raycast out from your controller, draw a line wiht a raycast, then teleport to that location. These flow nodes already exist and the lua funcitons are in the flow callbacks script.
function SteamVRFlowCallbacks.set_tracking_space(t) if not SteamVR then return t end local pose = Matrix4x4.from_quaternion_position(t.rotation, t.position) local scale = t.scale or Vector3(1, 1, 1) Matrix4x4.set_scale(pose, scale) Project.play_area_offset:store(pose) return t end
You can move around in the steam template however you like. You can set your input via flow, via lua or you can teleport. I recommend teleporting.
Use lua or flow to set your tracking space. You can do a raycast out from your controller, draw a line wiht a raycast, then teleport to that location. These flow nodes already exist and the lua funcitons are in the flow callbacks script.
function SteamVRFlowCallbacks.set_tracking_space(t) if not SteamVR then return t end local pose = Matrix4x4.from_quaternion_position(t.rotation, t.position) local scale = t.scale or Vector3(1, 1, 1) Matrix4x4.set_scale(pose, scale) Project.play_area_offset:store(pose) return t end
I'm a little unclear on how to connect the controller -> raycast -> Steam VR Set Tracking in flow.
I've been trying for a while but just can't get it.
Can you post a basic raycast from a controller to teleport flow?
I'm a little unclear on how to connect the controller -> raycast -> Steam VR Set Tracking in flow.
I've been trying for a while but just can't get it.
Can you post a basic raycast from a controller to teleport flow?
This is what I have so far, but I can't seem to get it to teleport me where I have it pointing.
This is what I have so far, but I can't seem to get it to teleport me where I have it pointing.
Hey, ok, well you have 1 thing straight off the bat that is going to pose problems. You are going to need to have some sort of a boolean gate on your steamvr button pressed. Otherwise it will teleport you a gazillion times when you press it. It is firing on every level update.
What you are going to want to do is as follows.
1. After the Steam VR Button Pressed, Add a Compare Objects Node.
2. Plug into that a Boolean Data set it to false and a Get Boolean Variable... name it something like TeleportPermitted
3. Directly after the compare objects node, you are going to have a set boolean data node. It should be named the same so... TeleportPermitted = False
This is now only runs the command once.
4. At the end of the teleport sequence the last thing you will need to do it set TeleportPermitted=True
Another problem i am seeing is in the logic of your design. It looks like you are using both head tracking and controller tracking. Im not sure what is going on there or what you ar inteneding. If you are teleporting based on your head position, then you should just be using it. if you are doing it based on your controller, then you should only use that. i dont see why you are trying to use both. Maybe i am missing something?
Paul
Hey, ok, well you have 1 thing straight off the bat that is going to pose problems. You are going to need to have some sort of a boolean gate on your steamvr button pressed. Otherwise it will teleport you a gazillion times when you press it. It is firing on every level update.
What you are going to want to do is as follows.
1. After the Steam VR Button Pressed, Add a Compare Objects Node.
2. Plug into that a Boolean Data set it to false and a Get Boolean Variable... name it something like TeleportPermitted
3. Directly after the compare objects node, you are going to have a set boolean data node. It should be named the same so... TeleportPermitted = False
This is now only runs the command once.
4. At the end of the teleport sequence the last thing you will need to do it set TeleportPermitted=True
Another problem i am seeing is in the logic of your design. It looks like you are using both head tracking and controller tracking. Im not sure what is going on there or what you ar inteneding. If you are teleporting based on your head position, then you should just be using it. if you are doing it based on your controller, then you should only use that. i dont see why you are trying to use both. Maybe i am missing something?
Paul
You will also want to use Steam VR World Pose, not local pose. maybe that is the root of your issue.
I would actually start there.
You will also want to use Steam VR World Pose, not local pose. maybe that is the root of your issue.
I would actually start there.
lastly i think you may need to make use of the "hit" boolean. This way you only teleport to the position when you are intersecting somthing. I am not entirely sure what the result will be otherwise. I will try and build this out tomorrow when i have some more time. i need to test a few things since i have personally never done this myslef. For the most part you seem to be on the right track.
Paul
lastly i think you may need to make use of the "hit" boolean. This way you only teleport to the position when you are intersecting somthing. I am not entirely sure what the result will be otherwise. I will try and build this out tomorrow when i have some more time. i need to test a few things since i have personally never done this myslef. For the most part you seem to be on the right track.
Paul
Here is an example:
You will raycast from your controller outward. Where you hit, on a button press you will set your tracking space. To visualize this, I've added spawning a circle mesh at the ray cast hit location and I've added a 'laser' mesh that I set the scale to the length of the ray cast. It helps to see where you are going. Your art is your choice though 🙂
gif of working here:
Flow nodes copy and paste, here:
Connections = [ { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "From" ToNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Rotation" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Rotation" ToNode = "9d49921b-f9a8-4177-8888-6702b946146e" Type = "Quaternion" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Forward" FromNode = "9d49921b-f9a8-4177-8888-6702b946146e" ToItem = "Direction" ToNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Hit" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Condition" ToNode = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" Type = "Bool" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Position" ToNode = "ec951f55-3c05-4d08-a6a6-94f3fbac96e7" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "Out" FromNode = "c97039d5-904f-48b1-b516-83e7e422a9a8" Priority = 0 ToItem = "update" ToNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "released" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "True" FromNode = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" Priority = 0 ToItem = "In" ToNode = "ec951f55-3c05-4d08-a6a6-94f3fbac96e7" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "held" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "pressed" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Spawn" ToNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "released" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Unspawn" ToNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Position" ToNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" ToItem = "Unit" ToNode = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Position" ToNode = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "held" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Position" ToNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "held" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" ToItem = "Unit" ToNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Position" ToNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "pressed" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Spawn" ToNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "released" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Unspawn" ToNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" ToItem = "Unit" ToNode = "a34f167b-4c1b-48d6-aa86-da2626a6a283" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Vector" FromNode = "da893dd6-8472-48e5-b48a-85f525f94f62" ToItem = "Scale" ToNode = "a34f167b-4c1b-48d6-aa86-da2626a6a283" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "Out" FromNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" Priority = 0 ToItem = "In" ToNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" ToItem = "Unit" ToNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Rotation" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Rotation" ToNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" Type = "Quaternion" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "Out" FromNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" Priority = 0 ToItem = "In" ToNode = "a34f167b-4c1b-48d6-aa86-da2626a6a283" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Distance" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "A" ToNode = "de6cb424-7283-4484-b9a5-33a4d1388a37" Type = "Float" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Value" FromNode = "de6cb424-7283-4484-b9a5-33a4d1388a37" ToItem = "Z" ToNode = "da893dd6-8472-48e5-b48a-85f525f94f62" Type = "Float" } ] Groups = [ ] Nodes = [ { Arguments = [ { RawName = "space" Type = "enum" Variable = { Choices = [ "Local" "World" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "World" } } { RawName = "controllerIndex" Type = "enum" Variable = { Choices = [ "1" "2" "3" "4" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "1" } } ] Brief = "" Category = "SteamVR" Class = "Stingray.Foundation.Flow.CustomScriptNode" FlowNodesResource = "script/steam_vr" FlowNodesResourceKey = "flow_nodes_resource" Id = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" InEvents = [ ] IsQuery = true Name = "SteamVR Controller Pose" NodeLocation = { X = 1040 Y = 1400 } OutEvents = [ ] ReturnValues = [ { RawName = "position" Type = "vector3" Variable = { Class = "Stingray.Foundation.Flow.OutVariableVector3" } } { RawName = "rotation" Type = "quaternion" Variable = { Class = "Stingray.Foundation.Flow.OutVariableQuaternion" } } ] Width = 220 } { Brief = "Returns three vectors (Right, Up, Forward) from a rotation (X,Y,Z) input." Class = "Stingray.Foundation.Flow.VectorsFromRotation" Forward = { } Id = "9d49921b-f9a8-4177-8888-6702b946146e" NodeLocation = { X = 1300 Y = 1540 } Right = { } Rotation = { } Title = "Vectors From Rotation" Up = { } Width = 160 } { Brief = "Passes an event at every update interval of the engine." Class = "Stingray.Foundation.Flow.LevelUpdate" Id = "c97039d5-904f-48b1-b516-83e7e422a9a8" NodeLocation = { X = 1100 Y = 1780 } Out = { } Title = "Level Update" Width = 160 } { Brief = "Creates a decision based data flow from a single boolean condition." Class = "Stingray.Foundation.Flow.Branch" Condition = { } False = { } Id = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" In = { } NodeLocation = { X = 1800 Y = 1460 } Title = "Branch" True = { } Width = 160 } { Arguments = [ { RawName = "controllerIndex" Type = "enum" Variable = { Choices = [ "1" "2" "3" "4" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "1" } } { RawName = "buttonName" Type = "enum" Variable = { Choices = [ "Trigger" "Grip" "System" "Menu" "TouchUp" "TouchDown" "TouchLeft" "TouchRight" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "Trigger" } } ] Brief = "" Category = "SteamVR/Input" Class = "Stingray.Foundation.Flow.CustomScriptNode" FlowNodesResource = "script/steam_vr" FlowNodesResourceKey = "flow_nodes_resource" Id = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" InEvents = [ "update" ] IsQuery = false Name = "SteamVR Button" NodeLocation = { X = 1280 Y = 1660 } OutEvents = [ "pressed" "held" "released" ] ReturnValues = [ { RawName = "value" Type = "float" Variable = { Class = "Stingray.Foundation.Flow.OutVariableFloat" } } ] Width = 180 } { Brief = "Spawns the unit at a specified position." Class = "Stingray.Foundation.Flow.SpawnUnitPositionRotation" Id = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" InEvents = [ ] InVariableNames = [ ] InVariables = [ ] NodeLocation = { X = 1800 Y = 1600 } OutEvents = [ ] OutVariableNames = [ ] OutVariables = [ ] Position = { } Rotation = { } Spawn = { } Spawned = { } SpawnedUnit = { } Title = "Spawn Unit on Position" Unit = { Value = "content/models/props/teleport_end" } Unspawn = { } Unspawned = { } Width = 280 } { Brief = "Spawns the unit at a specified position." Class = "Stingray.Foundation.Flow.SpawnUnitPositionRotation" Id = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" InEvents = [ ] InVariableNames = [ ] InVariables = [ ] NodeLocation = { X = 1800 Y = 1840 } OutEvents = [ ] OutVariableNames = [ ] OutVariables = [ ] Position = { } Rotation = { } Spawn = { } Spawned = { } SpawnedUnit = { } Title = "Spawn Unit on Position" Unit = { Value = "content/fx/laser" } Unspawn = { } Unspawned = { } Width = 200 } { Actor = { } Brief = "Casts a ray from a point in 3D space in a specified direction. Any units with physics collision that the ray intersects will be returned." Class = "Stingray.Foundation.Flow.Raycast" CollisionFilter = { } Direction = { } Distance = { } From = { } Hit = { } Id = "a4f017ba-fc7e-44a4-82a7-894396b511bb" In = { } Length = { Value = 1000 } NodeLocation = { X = 1540 Y = 1380 } Normal = { } ObjectType = { } Out = { } Position = { } Title = "Raycast" Unit = { } Width = 160 } { Brief = "Set the unit's local scale." Class = "Stingray.Foundation.Flow.SetUnitLocalScale" Id = "a34f167b-4c1b-48d6-aa86-da2626a6a283" In = { } NodeLocation = { X = 2640 Y = 1860 } Object = { Value = "laser_mesh" } Out = { } Scale = { } Teleport = { } Title = "Set Unit Local Scale" Unit = { UseMyUnit = false } Width = 160 } { Brief = "Constructs a vector from three separate X, Y and Z numeric components." Class = "Stingray.Foundation.Flow.VectorFromComponents" Id = "da893dd6-8472-48e5-b48a-85f525f94f62" NodeLocation = { X = 2380 Y = 1760 } Title = "Vector From Components" Vector = { } Width = 160 X = { Value = 0.5 } Y = { Value = 0.5 } Z = { } } { Arguments = [ { RawName = "position" Type = "vector3" Variable = { Class = "Stingray.Foundation.Flow.InVariableVector3" } } { RawName = "rotation" Type = "quaternion" Variable = { Class = "Stingray.Foundation.Flow.InVariableQuaternion" Value = "0 0 0 1" } } { RawName = "scale" Type = "vector3" Variable = { Class = "Stingray.Foundation.Flow.InVariableVector3" Value = "1 1 1" } } ] Brief = "" Category = "SteamVR" Class = "Stingray.Foundation.Flow.CustomScriptNode" FlowNodesResource = "script/steam_vr" FlowNodesResourceKey = "flow_nodes_resource" Id = "ec951f55-3c05-4d08-a6a6-94f3fbac96e7" InEvents = [ "In" ] IsQuery = false Name = "SteamVR Set Tracking Space" NodeLocation = { X = 1980 Y = 1380 } OutEvents = [ "Out" ] ReturnValues = [ ] Width = 160 } { Brief = "Sets the local position of the unit. If no object is specified, the units world position will be set instead." Class = "Stingray.Foundation.Flow.SetUnitLocalPosition" Id = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" In = { } NodeLocation = { X = 2140 Y = 1600 } Object = { } Out = { } Position = { } Teleport = { } Title = "Set Unit Local Position" Unit = { UseMyUnit = false } Width = 160 } { Brief = "Sets the local position of the unit. If no object is specified, the units world position will be set instead." Class = "Stingray.Foundation.Flow.SetUnitLocalPosition" Id = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" In = { } NodeLocation = { X = 2140 Y = 1880 } Object = { } Out = { } Position = { } Teleport = { } Title = "Set Unit Local Position" Unit = { UseMyUnit = false } Width = 160 } { Brief = "Sets the local rotation of the unit. If no object is specified, the units world rotation will be set instead." Class = "Stingray.Foundation.Flow.SetUnitLocalRotation" Id = "d37bd407-d7d4-449b-90af-316d3d5655e7" In = { } NodeLocation = { X = 2140 Y = 2040 } Object = { } Out = { } Rotation = { } Teleport = { } Title = "Set Unit Local Rotation" Unit = { UseMyUnit = false } Width = 160 } { A = { } B = { Value = -1 } Brief = "Returns a numeric value that represents the product of A and B." Class = "Stingray.Foundation.Flow.NumericTimesNumeric" Id = "de6cb424-7283-4484-b9a5-33a4d1388a37" NodeLocation = { X = 2140 Y = 1760 } Title = "Multiplication" Value = { } Width = 160 } ]
Here is an example:
You will raycast from your controller outward. Where you hit, on a button press you will set your tracking space. To visualize this, I've added spawning a circle mesh at the ray cast hit location and I've added a 'laser' mesh that I set the scale to the length of the ray cast. It helps to see where you are going. Your art is your choice though 🙂
gif of working here:
Flow nodes copy and paste, here:
Connections = [ { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "From" ToNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Rotation" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Rotation" ToNode = "9d49921b-f9a8-4177-8888-6702b946146e" Type = "Quaternion" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Forward" FromNode = "9d49921b-f9a8-4177-8888-6702b946146e" ToItem = "Direction" ToNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Hit" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Condition" ToNode = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" Type = "Bool" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Position" ToNode = "ec951f55-3c05-4d08-a6a6-94f3fbac96e7" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "Out" FromNode = "c97039d5-904f-48b1-b516-83e7e422a9a8" Priority = 0 ToItem = "update" ToNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "released" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "True" FromNode = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" Priority = 0 ToItem = "In" ToNode = "ec951f55-3c05-4d08-a6a6-94f3fbac96e7" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "held" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "pressed" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Spawn" ToNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "released" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Unspawn" ToNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Position" ToNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" ToItem = "Unit" ToNode = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "Position" ToNode = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "held" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Position" ToNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "held" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "In" ToNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" ToItem = "Unit" ToNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Position" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Position" ToNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "pressed" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Spawn" ToNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "released" FromNode = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" Priority = 0 ToItem = "Unspawn" ToNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" ToItem = "Unit" ToNode = "a34f167b-4c1b-48d6-aa86-da2626a6a283" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Vector" FromNode = "da893dd6-8472-48e5-b48a-85f525f94f62" ToItem = "Scale" ToNode = "a34f167b-4c1b-48d6-aa86-da2626a6a283" Type = "Vector3" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "Out" FromNode = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" Priority = 0 ToItem = "In" ToNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "SpawnedUnit" FromNode = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" ToItem = "Unit" ToNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" Type = "Unit" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Rotation" FromNode = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" ToItem = "Rotation" ToNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" Type = "Quaternion" } { Class = "Stingray.Foundation.Flow.EventConnection" FromItem = "Out" FromNode = "d37bd407-d7d4-449b-90af-316d3d5655e7" Priority = 0 ToItem = "In" ToNode = "a34f167b-4c1b-48d6-aa86-da2626a6a283" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Distance" FromNode = "a4f017ba-fc7e-44a4-82a7-894396b511bb" ToItem = "A" ToNode = "de6cb424-7283-4484-b9a5-33a4d1388a37" Type = "Float" } { Class = "Stingray.Foundation.Flow.VariableConnection" FromItem = "Value" FromNode = "de6cb424-7283-4484-b9a5-33a4d1388a37" ToItem = "Z" ToNode = "da893dd6-8472-48e5-b48a-85f525f94f62" Type = "Float" } ] Groups = [ ] Nodes = [ { Arguments = [ { RawName = "space" Type = "enum" Variable = { Choices = [ "Local" "World" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "World" } } { RawName = "controllerIndex" Type = "enum" Variable = { Choices = [ "1" "2" "3" "4" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "1" } } ] Brief = "" Category = "SteamVR" Class = "Stingray.Foundation.Flow.CustomScriptNode" FlowNodesResource = "script/steam_vr" FlowNodesResourceKey = "flow_nodes_resource" Id = "855e56f9-bb1d-4695-a7b4-bab98286ee8c" InEvents = [ ] IsQuery = true Name = "SteamVR Controller Pose" NodeLocation = { X = 1040 Y = 1400 } OutEvents = [ ] ReturnValues = [ { RawName = "position" Type = "vector3" Variable = { Class = "Stingray.Foundation.Flow.OutVariableVector3" } } { RawName = "rotation" Type = "quaternion" Variable = { Class = "Stingray.Foundation.Flow.OutVariableQuaternion" } } ] Width = 220 } { Brief = "Returns three vectors (Right, Up, Forward) from a rotation (X,Y,Z) input." Class = "Stingray.Foundation.Flow.VectorsFromRotation" Forward = { } Id = "9d49921b-f9a8-4177-8888-6702b946146e" NodeLocation = { X = 1300 Y = 1540 } Right = { } Rotation = { } Title = "Vectors From Rotation" Up = { } Width = 160 } { Brief = "Passes an event at every update interval of the engine." Class = "Stingray.Foundation.Flow.LevelUpdate" Id = "c97039d5-904f-48b1-b516-83e7e422a9a8" NodeLocation = { X = 1100 Y = 1780 } Out = { } Title = "Level Update" Width = 160 } { Brief = "Creates a decision based data flow from a single boolean condition." Class = "Stingray.Foundation.Flow.Branch" Condition = { } False = { } Id = "06341e17-23d2-4cb0-9b9c-8315eb8c3a7a" In = { } NodeLocation = { X = 1800 Y = 1460 } Title = "Branch" True = { } Width = 160 } { Arguments = [ { RawName = "controllerIndex" Type = "enum" Variable = { Choices = [ "1" "2" "3" "4" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "1" } } { RawName = "buttonName" Type = "enum" Variable = { Choices = [ "Trigger" "Grip" "System" "Menu" "TouchUp" "TouchDown" "TouchLeft" "TouchRight" ] Class = "Stingray.Foundation.Flow.InEnumVariable" Value = "Trigger" } } ] Brief = "" Category = "SteamVR/Input" Class = "Stingray.Foundation.Flow.CustomScriptNode" FlowNodesResource = "script/steam_vr" FlowNodesResourceKey = "flow_nodes_resource" Id = "877ce0b7-d987-4de7-94b1-b4c6b9577e13" InEvents = [ "update" ] IsQuery = false Name = "SteamVR Button" NodeLocation = { X = 1280 Y = 1660 } OutEvents = [ "pressed" "held" "released" ] ReturnValues = [ { RawName = "value" Type = "float" Variable = { Class = "Stingray.Foundation.Flow.OutVariableFloat" } } ] Width = 180 } { Brief = "Spawns the unit at a specified position." Class = "Stingray.Foundation.Flow.SpawnUnitPositionRotation" Id = "c3f1af67-f864-40c9-9a13-3a0ac773ac1a" InEvents = [ ] InVariableNames = [ ] InVariables = [ ] NodeLocation = { X = 1800 Y = 1600 } OutEvents = [ ] OutVariableNames = [ ] OutVariables = [ ] Position = { } Rotation = { } Spawn = { } Spawned = { } SpawnedUnit = { } Title = "Spawn Unit on Position" Unit = { Value = "content/models/props/teleport_end" } Unspawn = { } Unspawned = { } Width = 280 } { Brief = "Spawns the unit at a specified position." Class = "Stingray.Foundation.Flow.SpawnUnitPositionRotation" Id = "f3a0f1c3-63ac-4bcd-9ba3-4dc6442ec808" InEvents = [ ] InVariableNames = [ ] InVariables = [ ] NodeLocation = { X = 1800 Y = 1840 } OutEvents = [ ] OutVariableNames = [ ] OutVariables = [ ] Position = { } Rotation = { } Spawn = { } Spawned = { } SpawnedUnit = { } Title = "Spawn Unit on Position" Unit = { Value = "content/fx/laser" } Unspawn = { } Unspawned = { } Width = 200 } { Actor = { } Brief = "Casts a ray from a point in 3D space in a specified direction. Any units with physics collision that the ray intersects will be returned." Class = "Stingray.Foundation.Flow.Raycast" CollisionFilter = { } Direction = { } Distance = { } From = { } Hit = { } Id = "a4f017ba-fc7e-44a4-82a7-894396b511bb" In = { } Length = { Value = 1000 } NodeLocation = { X = 1540 Y = 1380 } Normal = { } ObjectType = { } Out = { } Position = { } Title = "Raycast" Unit = { } Width = 160 } { Brief = "Set the unit's local scale." Class = "Stingray.Foundation.Flow.SetUnitLocalScale" Id = "a34f167b-4c1b-48d6-aa86-da2626a6a283" In = { } NodeLocation = { X = 2640 Y = 1860 } Object = { Value = "laser_mesh" } Out = { } Scale = { } Teleport = { } Title = "Set Unit Local Scale" Unit = { UseMyUnit = false } Width = 160 } { Brief = "Constructs a vector from three separate X, Y and Z numeric components." Class = "Stingray.Foundation.Flow.VectorFromComponents" Id = "da893dd6-8472-48e5-b48a-85f525f94f62" NodeLocation = { X = 2380 Y = 1760 } Title = "Vector From Components" Vector = { } Width = 160 X = { Value = 0.5 } Y = { Value = 0.5 } Z = { } } { Arguments = [ { RawName = "position" Type = "vector3" Variable = { Class = "Stingray.Foundation.Flow.InVariableVector3" } } { RawName = "rotation" Type = "quaternion" Variable = { Class = "Stingray.Foundation.Flow.InVariableQuaternion" Value = "0 0 0 1" } } { RawName = "scale" Type = "vector3" Variable = { Class = "Stingray.Foundation.Flow.InVariableVector3" Value = "1 1 1" } } ] Brief = "" Category = "SteamVR" Class = "Stingray.Foundation.Flow.CustomScriptNode" FlowNodesResource = "script/steam_vr" FlowNodesResourceKey = "flow_nodes_resource" Id = "ec951f55-3c05-4d08-a6a6-94f3fbac96e7" InEvents = [ "In" ] IsQuery = false Name = "SteamVR Set Tracking Space" NodeLocation = { X = 1980 Y = 1380 } OutEvents = [ "Out" ] ReturnValues = [ ] Width = 160 } { Brief = "Sets the local position of the unit. If no object is specified, the units world position will be set instead." Class = "Stingray.Foundation.Flow.SetUnitLocalPosition" Id = "ad9acc29-feea-4a50-9cd4-e119fc2a6283" In = { } NodeLocation = { X = 2140 Y = 1600 } Object = { } Out = { } Position = { } Teleport = { } Title = "Set Unit Local Position" Unit = { UseMyUnit = false } Width = 160 } { Brief = "Sets the local position of the unit. If no object is specified, the units world position will be set instead." Class = "Stingray.Foundation.Flow.SetUnitLocalPosition" Id = "0c0522a5-7e87-4f70-b21a-8ea7e5bac8d6" In = { } NodeLocation = { X = 2140 Y = 1880 } Object = { } Out = { } Position = { } Teleport = { } Title = "Set Unit Local Position" Unit = { UseMyUnit = false } Width = 160 } { Brief = "Sets the local rotation of the unit. If no object is specified, the units world rotation will be set instead." Class = "Stingray.Foundation.Flow.SetUnitLocalRotation" Id = "d37bd407-d7d4-449b-90af-316d3d5655e7" In = { } NodeLocation = { X = 2140 Y = 2040 } Object = { } Out = { } Rotation = { } Teleport = { } Title = "Set Unit Local Rotation" Unit = { UseMyUnit = false } Width = 160 } { A = { } B = { Value = -1 } Brief = "Returns a numeric value that represents the product of A and B." Class = "Stingray.Foundation.Flow.NumericTimesNumeric" Id = "de6cb424-7283-4484-b9a5-33a4d1388a37" NodeLocation = { X = 2140 Y = 1760 } Title = "Multiplication" Value = { } Width = 160 } ]
It looks like you are using a more advanced version of the Steam VR plugin. I do not have a hold option on my Steam VR button, and there are a few other things that seem different. That being said, I got it working! Thanks for you help. I had to use a relay that was only latched on when a unit was not spawned in order to get my spawning model to not spawn a thousand times.
I appreciate your help and look forward to making more VR activities.
It looks like you are using a more advanced version of the Steam VR plugin. I do not have a hold option on my Steam VR button, and there are a few other things that seem different. That being said, I got it working! Thanks for you help. I had to use a relay that was only latched on when a unit was not spawned in order to get my spawning model to not spawn a thousand times.
I appreciate your help and look forward to making more VR activities.
Heh, sorry about that! We've updated the flow nodes -- of course as we continue to develop. These will all be available in v1.4. Glad you got it working 🙂 The concept is the same. You an always write your own custom flow nodes or just use the lua functions.
Heh, sorry about that! We've updated the flow nodes -- of course as we continue to develop. These will all be available in v1.4. Glad you got it working 🙂 The concept is the same. You an always write your own custom flow nodes or just use the lua functions.
Can't find what you're looking for? Ask the community or share your knowledge.