Camera Panning

TBFPSBoLt

  • Posts: 7
I'm making a Five Nights at Freddy's fan game, and I need to figure out how to use my mouse to pan the scene. If anyone has played this game, you'll know what I mean.

sdieters

  • Posts: 2068
You cant. Stencyl is a 2D engine, so its not capable of panning, since that is a 3D movement (you are rotating around the Z axis, while Stencyl only has X and Y).  You can however, instead of panning, simply scroll a bit from left to right.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

TBFPSBoLt

  • Posts: 7
You cant. Stencyl is a 2D engine, so its not capable of panning, since that is a 3D movement (you are rotating around the Z axis, while Stencyl only has X and Y).  You can however, instead of panning, simply scroll a bit from left to right.
It is still possible.  My friend is creating a Five Nights at Freddy's game in Stencyl, and his works fine. But for some reason, he won't tell me how to do it.

sdieters

  • Posts: 2068
Then he is faking it with some other technique, but Panning is impossible in Stencyl, since you can't rotate the camera.
Perhaps you can show us how he did it with a small video?
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

TBFPSBoLt

  • Posts: 7
Then he is faking it with some other technique, but Panning is impossible in Stencyl, since you can't rotate the camera.
Perhaps you can show us how he did it with a small video?
Sure. Here's a link to the games trailer, it contains gameplay footage.   https://www.youtube.com/watch?v=MiRDZjK-hgE

sdieters

  • Posts: 2068
Yup, like I expected.
This isn't panning, this is simple sidescrolling =)
You can create this by having a statement which checks the mouse position on screen, and if it is less then 5, move the camera to the left, or if it is more then screenwidth -5, move the camera to the right. Don't forget to include a statement to check if the camera hasn't moved to the right already, otherwise it will continue to go to a side meaning you have to wait a long time before you can move to the other side.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

TBFPSBoLt

  • Posts: 7
Yup, like I expected.
This isn't panning, this is simple sidescrolling =)
You can create this by having a statement which checks the mouse position on screen, and if it is less then 5, move the camera to the left, or if it is more then screenwidth -5, move the camera to the right. Don't forget to include a statement to check if the camera hasn't moved to the right already, otherwise it will continue to go to a side meaning you have to wait a long time before you can move to the other side.
Thanks!