SceneCoords getting skewed when the camera position is modified

This is the place for discussion and support for LunaLua and related modifications and libraries.
Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
Quantumenace
Ripper II
Ripper II
Posts: 308
Joined: Mon Dec 28, 2015 2:17 am

SceneCoords getting skewed when the camera position is modified

Postby Quantumenace » Mon Feb 13, 2017 1:33 am

The sceneCoords field was a really nice addition, but there's some issues related to modifying the camera position. In a certain part of my level I'm forcing the camera to the right by setting the camera.x value. It worked fine before, but the new version of particles.lua uses sceneCoords and is drawing the particles farther to the right than it should (about where they would be on the screen if the camera was left where the game expects).

I'm drawing the particles after setting the camera value. The relevant code:

Code: Select all

function onCameraUpdate()
	local cam = Camera.get()[1]
	
	...
	
	cam.x = platformcamx
	
	...
	
	bombsmoke:Draw()
Is this an oversight, or am I doing something wrong?


Edit: Nobody? I'll just use an older version of particles.lua with my level, but this issue seems like something that should be looked at.

Edit 2: ...and the old particles.lua is significantly slower, so that won't do.

Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari