Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,20 @@
from lnx.logicnode.lnx_nodes import *
class GoToLocationNode(LnxLogicTreeNode):
"""Makes a NavCrowd agent go to location.
@input In: Start navigation.
@input Object: The object to navigate. Object must have `NavCrowd` trait applied.
@input Location: Closest point on the navmesh to navigate to.
"""
bl_idname = 'LNCrowdGoToLocationNode'
bl_label = 'Crowd Go to Location'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxVectorSocket', 'Location')
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,13 @@
from lnx.logicnode.lnx_nodes import *
class GetAgentDataNode(LnxLogicTreeNode):
"""Gets the speed and turn duration of the agent"""
bl_idname = 'LNGetAgentDataNode'
bl_label = 'Get Agent Data'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Object')
self.add_output('LnxFloatSocket', 'Speed')
self.add_output('LnxFloatSocket', 'Turn Duration')

View File

@ -0,0 +1,44 @@
from lnx.logicnode.lnx_nodes import *
class GoToLocationNode(LnxLogicTreeNode):
"""Makes a NavMesh agent go to location.
@input In: Start navigation.
@input Object: The object to navigate. Object must have `NavAgent` trait applied.
@input Location: Closest point on the navmesh to navigate to.
@input Speed: Rate of movement.
@input Turn Duration: Rate of turn.
@input Height Offset: Height of the object from the navmesh.
@input Use Raycast: Use physics ray cast to get more precise z positioning.
@input Ray Cast Depth: Depth of ray cast from the object origin.
@input Ray Cast Mask: Ray cast mask for collision detection.
@output Out: Executed immidiately after start of the navigation.
@output Tick Position: Executed at every step of navigation translation.
@output Tick Rotation: Executed at every step of navigation rotation.
"""
bl_idname = 'LNGoToLocationNode'
bl_label = 'Go to Location'
lnx_version = 2
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxVectorSocket', 'Location')
self.add_input('LnxFloatSocket', 'Speed', 5.0)
self.add_input('LnxFloatSocket', 'Turn Duration', 0.4)
self.add_input('LnxFloatSocket', 'Height Offset', 0.0)
self.add_input('LnxBoolSocket','Use Raycast')
self.add_input('LnxFloatSocket', 'Ray Cast Depth', -5.0)
self.add_input('LnxIntSocket', 'Ray Cast Mask', 1)
self.add_output('LnxNodeSocketAction', 'Out')
self.add_output('LnxNodeSocketAction', 'Tick Position')
self.add_output('LnxNodeSocketAction', 'Tick Rotation')
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
if self.lnx_version not in (0, 1):
raise LookupError()
return NodeReplacement.Identity(self)

View File

@ -0,0 +1,10 @@
from lnx.logicnode.lnx_nodes import *
class NavigableLocationNode(LnxLogicTreeNode):
"""TO DO."""
bl_idname = 'LNNavigableLocationNode'
bl_label = 'Navigable Location'
lnx_version = 1
def lnx_init(self, context):
self.add_output('LnxDynamicSocket', 'Location')

View File

@ -0,0 +1,13 @@
from lnx.logicnode.lnx_nodes import *
class PickLocationNode(LnxLogicTreeNode):
"""Pick a location coordinates in the given NavMesh."""
bl_idname = 'LNPickLocationNode'
bl_label = 'Pick NavMesh Location'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'NavMesh')
self.add_input('LnxVectorSocket', 'Screen Coords')
self.add_output('LnxVectorSocket', 'Location')

View File

@ -0,0 +1,13 @@
from lnx.logicnode.lnx_nodes import *
class StopAgentNode(LnxLogicTreeNode):
"""Stops the given NavMesh agent."""
bl_idname = 'LNStopAgentNode'
bl_label = 'Stop Agent'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_output('LnxNodeSocketAction', 'Out')