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
→
Targeting Camera or Fight Game Camera?
Pages:
1
Targeting Camera or Fight Game Camera?
ozz
Posts: 575
March 17, 2021, 02:14:41 pm
I'm trying to alter may Camera (current behavior below) to be able to keep both the Player Actor and Boss Actor in the frame. Any idea how I could make that adjustment?
merrak
Posts: 2726
March 17, 2021, 04:33:09 pm
If you assume that both actors are within one screen of each other, you can take the average of their x,y coordinates and center the camera on that point. If they're too far apart, you can then move the camera to the player.
`/\=======/\"-
Website! -
http://www.anorthogonaluniverse.com
Facebook -
http://www.facebook.com/rlwatson
Twitter -
https://twitter.com/merrak
ozz
Posts: 575
March 17, 2021, 10:24:14 pm
Thank you Merrak, I'll try that.
ozz
Posts: 575
March 18, 2021, 10:32:51 pm
Wow, that worked great. Thanks.
Pages:
1