Can I make player rotate to cursor position with ORK node editor (like in top-down shooters for example, while holding down a mouse button)? Or should I use custom scripts (or maybe Makinom)?
You can do this in the event system by using a Raycast To Variable node to get the position the mouse is currently at (i.e. what's currently below the mouse) and a Roate To node to rotate the player's game objec to the stored position (Vector3 variable).
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!
Sadly ork doesn't have a node to do this. Using his other asset, Makinom, it's easily done. Following the tutorial on how to connect ork and makinom together, just create a schematic using the change cursor texture node, save it, and in the ork's event, use the call makinom schematic node to call the node. Or just create a script to change the cursor(easy to do as well), and call the function using the call function node
You can also do the complete mechanic in Makinom :)
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!
Shadow_Fire said: Or just create a script to change the cursor(easy to do as well), and call the function using the call function node
Ok, I created this script
public class cursortarget : MonoBehaviour { public Texture2D cursorTexture; public CursorMode cursorMode = CursorMode.Auto; public Vector2 hotSpot = Vector2.zero;
public void targetcursorremove () { Cursor.SetCursor(null, Vector2.zero, cursorMode); } }
Attached it to the player and attached a texture to it. Added two "Call Function" nodes to an event for changing cursor to "target" texture and back. And it works fine... on an empty field without enemies. But when the enemy comes in a certain range near the player, cursor starts to blink and constantly change from target to normal and back (while I'm holding an event button).
I can't figure out why this is happening. I was thinking, maybe it has something to do with raycast, so I disabled raycast step in the event, but it keeps happening. Only when enemies are near the player. Do you have any ideas, where should I look?
UPD: now I found out, cursor is blinking when player gets targeted by the enemy. I think It's because ORK cursor settings ("menu settings > cursor settings") are messing with my script. Maybe I'll try to use Makinom.
UPD2: Tried the same with Makinom node call, issue still remails. If I only could override ORK cursor settings with this event, but I don't know if it is possible.
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!
Hm, no, currently not. I'll look into adding options for this, maybe a new event node to enable/disable ORK's cursor feature as needed.
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!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
For example change cursor image from standard to "target" image?
Or just create a script to change the cursor(easy to do as well), and call the function using the call function node
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Added two "Call Function" nodes to an event for changing cursor to "target" texture and back.
And it works fine... on an empty field without enemies.
But when the enemy comes in a certain range near the player, cursor starts to blink and constantly change from target to normal and back (while I'm holding an event button).
I can't figure out why this is happening.
I was thinking, maybe it has something to do with raycast, so I disabled raycast step in the event, but it keeps happening. Only when enemies are near the player. Do you have any ideas, where should I look?
UPD: now I found out, cursor is blinking when player gets targeted by the enemy. I think It's because ORK cursor settings ("menu settings > cursor settings") are messing with my script.
Maybe I'll try to use Makinom.
UPD2: Tried the same with Makinom node call, issue still remails. If I only could override ORK cursor settings with this event, but I don't know if it is possible.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Can I disable it, so this settings won't interfere with the event?
I couldn't find how.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!