playMaker

Author Topic: Advance Wars-like camera  (Read 1828 times)

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Advance Wars-like camera
« on: February 24, 2016, 05:54:51 PM »
Hello,
I'm hitting the wall...all i got is like Advance wars setup, got terrain, mouse controlled camera movement (after left mouse button down) but my camera move out of terrain i want to present, dont know how to achieve so camera stop at the edges of terrain like in advance wars.
Anyone willing to help, it is even possible in Playmaker?

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Advance Wars-like camera
« Reply #1 on: February 25, 2016, 05:42:26 AM »
Anyone can help?
I try to Get vector3, set vector 3, and clamp the position.....not working at all.
Any hint, suggestion where to start?

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Advance Wars-like camera
« Reply #2 on: February 25, 2016, 08:38:23 AM »
I try to make edge colliders on Terrain sprite and rigidbody on camera but when i move camera with move stronger it fly through the edge colliders.....omg, dont know making that "basic" camera in Unity/Playmaker is like doing weird magic  >:(

jasperPT

  • Full Member
  • ***
  • Posts: 110
  • I am a VFX Animator teaching myself to make games
    • View Profile
Re: Advance Wars-like camera
« Reply #3 on: February 25, 2016, 09:11:13 AM »
Try setting up a few vector 3 variables with the x/y of your boundaries
clamp your camera every frame with these values.
If it is just a square space this should be quite simple.

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Advance Wars-like camera
« Reply #4 on: February 25, 2016, 10:51:00 AM »
Try setting up a few vector 3 variables with the x/y of your boundaries
clamp your camera every frame with these values.
If it is just a square space this should be quite simple.

Thank you for answer.

Yes, this is for square space (sprite,which is my terrain).
I set up Get Vector3 XYZ in FSM on my Sprite(terrain) to get vector3 in variable and make that x,y in floats global variable. Then in Camera FSM i add Float clamp
 and set up as on screenshot.
My logic is that GetVector make vector3 (sprite size) into floats and then clamp action on camera convert those clamp into boundrys to limit camera movement but i think my logic fail....

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Advance Wars-like camera
« Reply #5 on: February 25, 2016, 05:15:13 PM »
Is this right path? I put some screenshots in previous post with FSM and still trying to figure this out in a way JasperPT told me but i definitely do something wrong i watch all tutorials about cameras and dont see anything about making bounds for camera, basic stuff when it comes to camera functionality but seems imposible for me, some more help based on what i achieved so far will be greatly appreciated.

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Advance Wars-like camera
« Reply #6 on: February 26, 2016, 03:10:53 AM »
Maybe this is totaly wrong, maybe someone do this other way, i dont ask for complete "how-to-do-it", some link where someone do this. I really google this and find nothing helpful about doing thisin Playmaker......Please, help.

profil84

  • Playmaker Newbie
  • *
  • Posts: 7
    • View Profile
Re: Advance Wars-like camera
« Reply #7 on: February 27, 2016, 06:47:43 PM »
Anyone??