Problem with vectorToAngle and camera
Hi everyone
Love this forum, and usually I always find my answers here or in T-shirt booth`s tutorials, but now I´m really stuck.
Im working on a game with two blobs, that usese vectorToAngle to move when touch. I also have a camera that are moved by sliding with your finger (like angry birds). Everyting works fine untill the actors have moved outside the cameras start posistion. From then the actors can only move left, no matter what. This is super frustrating, and i can`t figure out why?
Heres the project file: http://www.knutgrafisk.com/sinsquid/gamesalad/blobproblem.zip
Can anyone help me with this?
![blob1](http://www.knutgrafisk.com/sinsquid/gamesalad/blob1.png)
Feel free to check out how i did the camera, movement, animations, etc... but please do not steal my graphics or sounds, will be working more on theese. Thanx![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Im working on a game with two blobs, that usese vectorToAngle to move when touch. I also have a camera that are moved by sliding with your finger (like angry birds). Everyting works fine untill the actors have moved outside the cameras start posistion. From then the actors can only move left, no matter what. This is super frustrating, and i can`t figure out why?
Heres the project file: http://www.knutgrafisk.com/sinsquid/gamesalad/blobproblem.zip
Can anyone help me with this?
![blob1](http://www.knutgrafisk.com/sinsquid/gamesalad/blob1.png)
Feel free to check out how i did the camera, movement, animations, etc... but please do not steal my graphics or sounds, will be working more on theese. Thanx
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Best Answer
-
JohnPapiomitis Posts: 6,256
Answers
It still happens if I delete the Drag and Camera actors from the scene and add a "Control Camera" behavior to one of your actors.
Also, if you put a Display Text behavior on your actors set to the VectorToAngle expression you're using, you'll see that the Direction value gets set to near 0 while this is happening.
Again, I'm not solving anything, but maybe these clues will get you closer to a solution.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
The soulution: Added a camere offset (se the video) and then i added this vector to angle code, and it`s now working like a charm
Thanx for the help @JohnPapiomitis