TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Shoot towards Mouse
Pages:
1
Shoot towards Mouse
AwesomePassword
Posts: 104
July 16, 2012, 09:50:31 pm
The idea is to have a character, and when you click the mouse, he shoots out a bullet aiming at the mouse. It works fine..until you start adding scrolling. When you make the level big and have the camera follow the player, the code goes all wacky. That is to say, the bullet doesn't shoot in the right direction anymore.
That's my code.
Help.
~Password
===
Games:
-Tetra Factory - 80%
rob1221
Posts: 9472
July 16, 2012, 10:14:21 pm
Try adding the X and Y of the camera to the X and Y of the mouse.
https://twitter.com/Rob1221dev
Pages:
1