Update Files
This commit is contained in:
@ -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')
|
||||
|
13
leenkx/blender/lnx/logicnode/navmesh/LN_get_agent_data.py
Normal file
13
leenkx/blender/lnx/logicnode/navmesh/LN_get_agent_data.py
Normal 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')
|
44
leenkx/blender/lnx/logicnode/navmesh/LN_go_to_location.py
Normal file
44
leenkx/blender/lnx/logicnode/navmesh/LN_go_to_location.py
Normal 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)
|
||||
|
@ -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')
|
@ -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')
|
13
leenkx/blender/lnx/logicnode/navmesh/LN_stop_agent.py
Normal file
13
leenkx/blender/lnx/logicnode/navmesh/LN_stop_agent.py
Normal 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')
|
0
leenkx/blender/lnx/logicnode/navmesh/__init__.py
Normal file
0
leenkx/blender/lnx/logicnode/navmesh/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user