Games
Developers
Forums
More
BYOND
Download
Developer Guide
Developer Reference
Support
Terms of Service
Membership
Contact Us
Many features on this site require JavaScript. Please enable JavaScript support in your browser.
Register
Login
BYOND Forums
Announcements
·
BYOND Help
·
Bug Reports
·
Feature Requests
·
Beta Testers
·
Beta Bugs
·
Developer Help
·
Design Philosophy
·
Demos & Libraries
·
Tutorials & Snippets
·
Art & Sound
·
Classified Ads
·
Game Updates
·
Contests & Events
·
Linux Talk
·
On Topic
·
Off Topic
<HOW-TO>Player mouvement based on mouse position
[Tips]
Page:
1
2
Jun 6 2017, 1:08 pm
In response to
Gunbuddy13
Kaiochao
Luckily, someone in the past has already made an algorithm for getting a more useful direction:
http://www.byond.com/forum/?post=195151
And here's an explanation for what it does:
http://www.byond.com/forum/?post=195152
Basically, you can use this instead of get_dir() to get a direction that's closer to the mouse.
If you want precise, straight lines toward the mouse, then you should just use pixel movement.
Jun 6 2017, 1:27 pm
Louis53
Okay is pixel movement a very better slution for my need? Because if it is I couldtry to change to it but i've never done it before
Page:
1
2
Copyright © 2025 BYOND Software. All rights reserved.
http://www.byond.com/forum/?post=195151
And here's an explanation for what it does:
http://www.byond.com/forum/?post=195152
Basically, you can use this instead of get_dir() to get a direction that's closer to the mouse.
If you want precise, straight lines toward the mouse, then you should just use pixel movement.