Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with moving an image while using camera.follow #6

Open
CodeLuca opened this issue Oct 3, 2014 · 5 comments
Open

Issue with moving an image while using camera.follow #6

CodeLuca opened this issue Oct 3, 2014 · 5 comments

Comments

@CodeLuca
Copy link

CodeLuca commented Oct 3, 2014

Hey again,
I am sorry for sending you so many issues. Anyways, here is another one:
I have tried adding shooting to your world-camera example and if you move the camera and shoot a bullet then the camera cannot move until a bullet is not being spawned. It is really strange.

@CodeLuca
Copy link
Author

CodeLuca commented Oct 3, 2014

@StrykerKKD
Copy link
Owner

The problem is that you want to follow the player and move the camera at the same time, but you can't use them at the same time. You can follow the player or move the camera.
You can use the unfollow method to move the camera by keyboard events or don't follow the player at all.

@CodeLuca
Copy link
Author

CodeLuca commented Oct 3, 2014

I didn't even realise I had the camera following thing sorry. Even so, whenever a bullet is fired the player is stopped from moving: https://gyazo.com/8e37a375d9686f5f9d3552223de58219
new code: https://gist.github.com/CodeLuca/4c92c568fdfdb056c3d3

@StrykerKKD
Copy link
Owner

Weird. I looked at the code and it shouldn't stop there, although i don't see any follow or camera moving in the code, but in the gif the camera follows the player.

@CodeLuca
Copy link
Author

CodeLuca commented Oct 4, 2014

God I am really stupid sometimes. That is the wrong code. Here is the actual code:
https://gist.github.com/CodeLuca/c86fa084de31274325cf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants