How To Get Actor To Stop Following Mouse

Learn how to start making games.

How To Get Actor To Stop Following Mouse

Postby PerrySteven » Sun Jun 07, 2015 4:24 am

Hello, recently I have been working on my game, on a specific scene where the player has to move branches to a working area to form a fireplace. So far, activating the "Follow Mouse" function is very easy, but what I want to do now is make the branch stop following the mouse. How do I do that? I know that there are a few posts out there giving a solution on how to solve such a thing. But they are very complicated.
User avatar
PerrySteven
 
Posts: 46
Joined: Sun Jan 25, 2015 4:29 am
Location: Malaysia
Score: 1 Give a positive score

Re: How To Get Actor To Stop Following Mouse

Postby koala » Sun Jun 07, 2015 9:33 am

Why don't you use "Drag"?
Phascolarctos cinereus
YouTube: Marko Radivojevic
Google+: Marko Radivojevic
User avatar
koala
 
Posts: 301
Joined: Thu Mar 26, 2015 7:03 pm
Location: Serbia
Score: 30 Give a positive score

Re: How To Get Actor To Stop Following Mouse

Postby skydereign » Mon Jun 08, 2015 4:50 am

As koala has said, you could use the mouse button down drag feature instead. But to stop the actor from following the mouse when you use FollowMouse, you can use NONE_AXIS instead of BOTH_AXIS.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: How To Get Actor To Stop Following Mouse

Postby PerrySteven » Tue Jun 09, 2015 5:15 am

skydereign wrote:As koala has said, you could use the mouse button down drag feature instead. But to stop the actor from following the mouse when you use FollowMouse, you can use NONE_AXIS instead of BOTH_AXIS.


Ahh, thank you very much! By the way, I have never heard of that Drag feature, can you explain it?
User avatar
PerrySteven
 
Posts: 46
Joined: Sun Jan 25, 2015 4:29 am
Location: Malaysia
Score: 1 Give a positive score

Re: How To Get Actor To Stop Following Mouse

Postby koala » Tue Jun 09, 2015 12:05 pm

When you choose event Mouse Button Down, or something like that, there's an option Drag set to Disable by default. Just change it to Enable.
Phascolarctos cinereus
YouTube: Marko Radivojevic
Google+: Marko Radivojevic
User avatar
koala
 
Posts: 301
Joined: Thu Mar 26, 2015 7:03 pm
Location: Serbia
Score: 30 Give a positive score

Re: How To Get Actor To Stop Following Mouse

Postby PerrySteven » Fri Jun 12, 2015 10:17 am

koala wrote:When you choose event Mouse Button Down, or something like that, there's an option Drag set to Disable by default. Just change it to Enable.


Wow, thank you for that information.
User avatar
PerrySteven
 
Posts: 46
Joined: Sun Jan 25, 2015 4:29 am
Location: Malaysia
Score: 1 Give a positive score


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 1 guest