Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Problems with creating camera following a sprite


Alex5991
 Share

Recommended Posts

Hi, I have read pretty much a majority of the google result of "pixi js camera player" and manage to make this : https://codepen.io/anon/pen/BeYWEq?editors=0010

Basicly I would want to simulate a camera which turns the world with it, so what is in front of the player is always what is in front of the camera, but I get weird results. If someone could help that would be very nice.

Thanks in advance for your help.

Link to comment
Share on other sites

There is somes ways to implement a camera system. This will vary depending on your type of project and need.
However I am not successful at understanding your codePen sorry, it look like a video player ?.

On my side i use this ways.
App=>stage=>camera=>scene=>sprites...

The camera are controlled by .pivot and the scene position are fixed.

Also camera are not the reel name in english, i think you look for the keyword `viewport`
This is a good example of a camera view-port.

https://github.com/davidfig/pixi-viewport

Hope this can help you

 

 

edit: 

  • App control listener, tikers and master app
  • stage control container and loader and display stuff.
  • camera control rendering.
  • scene control sprite and stuff.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...