I am implementing a point-click game and trying to get a spawned prefab to follow the mouse Raycast (on a Ground Layer ) until the middle mouse button is clicked, but without much success (at the moment the prefab is not even spawning :( )
Any help would be appreciated, this is how the schematic looks like:

image
  • After few tests with the Ability Battle Animations and the schematic it looks like this schematic might need to be injected when an ability shortcut becomes active.

    Any suggestion how that could be done?
  • That's actually covered by ORK's built-in raycast targeting system, which also has options to spawn a cursor.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Is there a way to control ORK's built-in raycast targeting system when an ability is selected and decide what prefab gets spawned based on the data in the ability?

    I am trying to create a "construction" ability (build defense turret for example)
    The idea is, when an ability is selected, spawning a placeholder prefab that validates the construction location availability based on the mouse position on a Layer and when the ok mouse button is clicked, spawns a final building (if the ground area is free of obstacles).
  • Not directly, but the prefab can use target raycast highlight components for something like this.
    ORK comes with a few built-in example components - e.g. using schematics could be used to handle this. The schematic has the ability/item available as local selected data action.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ok, I added the component Target Raycast Cursor: Schematic and now I have the construction prefab spawning for all abilities :)

    I didn't understand exactly which node I should use in the Start Schematic Asset in order to get the info of the active ability since there are a ton of action related nodes but I can't find a node like "check active ability" or equivalent.
  • The ability is already stored in the local selected data of the schematic and can be accessed via the data key action (the same way as in e.g. schematics animating the action or formulas calculating outcome for it).
    Selected data can be used in many nodes, so it'd depend on what you want to check for - e.g. you can check a variable of the ability via Check Variables node using Selected Data variable origin.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you for the help, I was able to get the schematic access the ability!

    The prefab with the target raycast highlight components has a component (SpawnConstuctionSearchBuilding) with some functions (ex. ActivateSearch() )I'd like to call, what is the right Target Object setup to access them?

    I have tried Starting Object, Machine Object and Selected Data but the function never gets called...

    image
  • Hm ... yeah, I don't think the cursor game object itself is currently available to the schematic.
    I'll look into it.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you Nicholas :)
  • Just checking if there's any update :)
  • Will be in the next update :)
    The schematic cursor prefab components will have access to the cursor's game object via selected data cursor.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you for the update :)
Sign In or Register to comment.