- Home /
'Sticky' cursor
Hi, all!
I was wondering if anyone had a clever idea as to how to create a 'sticky' crosshair / mouselook.
I'm not searching for a 'Lock On' function - just a partial one. Like, when a player hovers over an enemy, it's just a little more difficult to keep the cursor from following it. Like, the player would have to aim, say, x units in any direction away from the enemy to get the camera and cursor from focusing on it.
I feel that this would greatly increase my game's playability.
So. any ideas?
Thanks! - YA
Yes that sounds just about right. It's not exactly 'autoTarget', but it just makes being accurate a little easier.
Answer by TheDarkVoid · Dec 21, 2012 at 09:04 PM
What you could do is when your cursor gets near the target you set your cross-hair to the target but not the cursor and when the cursor gets out of a certain range then you set the cross-hair back to the cursor.
Hmmm... Yes I guess that there is my problem. The cross-hair IS the cursor, and the camera has a mouselook. I have to believe that someone has wanted this in their game before... :/
then you can slow the camera's tracking speed while the cursor is within the target
That might work. I'll try it out and post results. Thanks!
It seems that I cannot communicate between my unityScript and my c# mouselook...
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Ref modifier 1 Answer
Silly question, doing nothing? 4 Answers
Performance cost in code 0 Answers
Unexpected symbol 'public'. (97,22) How to fix that? 0 Answers