View Issue Details

IDProjectCategoryView StatusLast Update
0028611RunnerSurfacesPublic2018-08-23 15:28
ReporterStewart BishopAssigned ToFritz 
PriorityMediumSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Product Version2.1.3 
Target Version2.2.1Fixed in Version2.2.1 
Summary0028611: Surfaces: Camera weirdness happens when changing what surface is being targeted whilst an angle is applied to the camera
DescriptionI use camera_set_view_angle() for a screenshake effect on my game, and since I ported the game over from GMS1 (where things worked fine) I noticed some tearing on the screenshake.

I tried to rotate the camera on it's own after that, and while the camera and ground tiles rotated one way, instances (that were on top half of the view) rotated the other way around. I've been trying to find a solution for this for a few days now, since I thought it was on my end, or something was messed up within the importing, but so far I haven't been able to fix this.
Steps To Reproduce1) Run the project
2) Move the instance around
3) See that no weirdness happens
4) Rotate the camera
5) Move again some more
6) Weirdness happens now
7) If no weirdness happens then restart and try again
Additional InformationInstead of anything going wrong with the camera, it seems that whenever I call the surface_set_target() (and surface_reset_target, obviously) the more the camera breaks.

Let me explain the situation a bit:

Since GMS2 has the layer things instead of depth, I made my own depth script (quite simply, it just draws things in proper order. Nothing out of the ordinary there)
To achieve this, I have a object that draws everything from a ds_grid. There are two kinds of drawing codes, a simple one (that just uses draw_self() ) and then if there’s something that needs more than just draw_self() I use event_perform()

This all works as supposed to, but within that same object I also have my game effects drawn in there.

For every effect I have, I basically draw on a surface (global surface, so every effect uses the same surface)
Every effect has it’s own script, which is basically like:

-Set the target surface, and clear it
-Draw everything that the effect needs to be drawn onto that surface, and reset target
-Draw the surface

And then, within my drawer object (that basically draws everything within the game) the draw event goes:

-Draw effect 1
-Draw effect 2
-Draw all objects
-Draw effect 3
-Draw effect 4

Now, if I go and disable all of the effects (or simply just comment the surface_set_target() and surface_reset_target() ’s off complitely) everything works just as supposed. But as soon as I enable one or more effects, the camera starts acting very weird. Also, the more I have effects going on, the more the camera seems to freak out.

Again, this all worked on GMS1, although I did not have a object to draw everything, but everything was drawn in seperate objects. This however was still the case when I ported the game over from GMS1, and didn’t touch anything yet. I just used the compilability scripts GMS2 created, and those had the same result, even if everything was drawn in seperate objects.
TagsNo tags attached.
1.4 Found In
2.x Runtime Found In2.1.3.189
2.x Runtime Verified InInternal Build


There are no notes attached to this issue.