Help controlling camera

juanpitrijuanpitri Member, PRO Posts: 21
edited May 2015 in Tech Support

I'm making a game about shooting balls to a boat from a cannon in the bottom of the screen. I made a scrolling camera watching youtube tutorials. Also I want to make the camera follow the ball after shooting it. I tried this, the camera follows the ball, but I cant scroll anymore after the camera follows the ball. How can I fix that error?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    How can you scroll and have the camera controlled at the same time? I know... answering a question with a question isn't all that helpful but I'm trying to wrap my head around how you would auto-follow the ball actor and still have free control over scrolling where you are in the scene.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • WOLFENSTEINWOLFENSTEIN Member, PRO Posts: 64
    edited May 2015

    Tating - I think it's a case of once the ball has finished moving, when it's time to shoot a second ball it won't scroll.

    It would help to know what method you're using to scroll the camera in the first place, is it an invisible actor moving left and right? Or does the gun itself move around.

    I'm not overly experienced at controlling the camera but it could be your original method of scrolling is now out of that center box that controls the camera, and therefor can't control the camera. What you could do is write a bit of code along the lines of;

    when ball overlaps with boat, after 2 seconds spawn actor (and invisible actor) 'move to' cannon, edit make sure this actor has control camera behavior enabled, this would center the camera again over the cannon, then destroy actor on overlap with cannon. this could solve the issue.

    Also make sure you destroy the ball actor so it doesn't conflict, and make sure it's destroyed after the invisible block has spawned, or it won't spawn.

    • I hope this is some kind of help. :)
  • juanpitrijuanpitri Member, PRO Posts: 21

    I used this method
    I'm going to try your method, Thanks for the help :)

Sign In or Register to comment.