Codea 2.5.2 (98)

It would be nice if scene:update(dt) passed on dt to all the update functions that get called.

scene = craft.scene()
e = scene:entity()
e:add(someClass)

Then scene:update(dt) calls the update method of someClass but doesn’t pass on the dt argument. If it did, that would allow for easy change of the global “tick”.

Also, craft.model.cube doesn’t accept no arguments (docs imply it should); and there’s a typo in the docs for slerp: p2 should be q2.

Something I just noticed about scene:update(dt) . If dt is replaced with a value of 1, physics objects move extreamly fast. If dt is replaced with .001, then physics objects move extreamly slow. I don’t know if that was mentioned anywhere, but that might come in handy at some point.

Block Library, place a block below the bottom. Might be because voxel are set to nil there.

BasicPlayer:254: BasicPlayer:264: attempt to index a nil value (local 'b2')
stack traceback:
	[C]: in metamethod '__index'
	BasicPlayer:264: in function <BasicPlayer:255>
	[C]: in method 'raycast'
	BasicPlayer:254: in method 'tapBlock'
	BasicPlayer:90: in field 'tapped'
	FirstPersonTouch:69: in method 'touched'
	Touches:37: in method 'touched'
	Touches:93: in field 'touched'
	Touches:103: in function 'touched'
stack traceback:
	[C]: in method 'raycast'
	BasicPlayer:254: in method 'tapBlock'
	BasicPlayer:90: in field 'tapped'
	FirstPersonTouch:69: in method 'touched'
	Touches:37: in method 'touched'
	Touches:93: in field 'touched'
	Touches:103: in function 'touched'

@dave1707 Right, so the dt controls how fast the physics engine goes, but I’d like that to extend to custom classes.

@LoopSpace dt is just DeltaTime. DeltaTime is global so you could just use DeltaTime anyplace you want dt.

@dave1707 good find on the floating icon bug!

@se24vad that’s really odd. I experience that Find-from-shortcut bug when I install the TestFlight beta, but not when I build from my device to debug the issue.

@dave1707 I want to be able to adjust the run-rate of the scene. I should be able to do

scene:update(DeltaTime/2)

and have everything run at half speed. I do not want to have to use DeltaTime in my classes because I might not want to work at that rate. For example, I might be capturing stills to put together into a movie later. Each frame might take a variable length of time to compute, but I want each to pretend as if it were a fixed frame rate. So writing scene:update(1/60) ensures that each frame is one sixtieth of a second on from the previous one.

@LoopSpace that sounds like a good request, I’ve logged it on the task board for @john to look at.

New thread here: https://codea.io/talk/discussion/8856/codea-2-5-2-99

(All the bugs reported in this one have been added to our issue tracker, so don’t worry if the next build doesn’t fix everything. We still have it documented.)