Brady- A Camera Library with Parallax Scrolling
Re: Brady- A Camera Library with Parallax Scrolling
Okay, I played around the options, but nothing work. Sorry for my dumbness, and sorry for still asking for your help, here is what I made with gamera and that what I try to achive.
- Attachments
-
- MV platformer gamera.love
- (978.88 KiB) Downloaded 212 times
Re: Brady- A Camera Library with Parallax Scrolling
No, you're not at fault- the docs are pretty poorly explained as they are right now.
For instance, the function camera.new takes 4 arguments: x, y, width, and height.
All these refer to the screen, i.e. x and y are the x and y position for the location of the camera on the screen. Width and height represent the camera's width and height on a default canvas.
In order to do what you want, it would look more like this:
For instance, the function camera.new takes 4 arguments: x, y, width, and height.
All these refer to the screen, i.e. x and y are the x and y position for the location of the camera on the screen. Width and height represent the camera's width and height on a default canvas.
In order to do what you want, it would look more like this:
Code: Select all
cam = camera.new( 0, 0, love.graphics.getDimensions() )
cam:setZoom( 4.8 )
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
Alright, thank you for help and patience. Turn out when I move the camera with cam:moveTo the camera just ignore adjustposition and go through the boundaries. Have a nice day.
Re: Brady- A Camera Library with Parallax Scrolling
The camera shouldn't be ignoring those positions. It sounds like you haven't ported over the code correctly from gamera. I'm not really familiar with it, but I'm fairly sure you could get it to work like you have it with gamera.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling and Aspect Ratios
Brady has been updated. You can find the repo here.
Major points include:
- Compatible with 0.10.0
- Aspect ratios
- Relative scale for layers (on top of the layer scale)
Major points include:
- Compatible with 0.10.0
- Aspect ratios
- Relative scale for layers (on top of the layer scale)
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
Brady has been updated. You can find the repo here.
Updates include:
- Get the coordinates of the mouse within the world more easily with :getMouseWorldCoordinates
- Zoom into a given point (by a factor) with :scaleToPoint
- Zoom into a given point (by increment) with :incrementScaleToPoint
Updates include:
- Get the coordinates of the mouse within the world more easily with :getMouseWorldCoordinates
- Zoom into a given point (by a factor) with :scaleToPoint
- Zoom into a given point (by increment) with :incrementScaleToPoint
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Who is online
Users browsing this forum: No registered users and 3 guests