Spherecast demo

This project’s orcHitTest function demonstrates using a spherecast to make an orc model jump when the orc collides with something near its feet.

Update: previous file didn’t work. This one does. :slight_smile:

I got an error:

Main:161: bad argument #1 to 'mul' (`vec3' expected)
stack traceback:
	[C]: in metamethod 'mul'
	Main:161: in function 'orcHitTest'
	Main:148: in function 'draw'

Was that with the updated version? The first one I posted did have that error, I thought I corrected it in the update.

Thanks! The new one is OK!

@UberGoober - I’m getting errors for Craft but I’m assuming that your demo is Codea V3 and I’m on 4.

@Bri_G You can easily switch between 3.x and 4.x depending on what version of code you want to run.

@dave1707 tried with and without the require legacy but still fires up errors. It also mentions craft as unrecognized. I have made sure dependencies for camera and blocks were activated. Could there be clashes in the dependency code, I’ll check that.

@Bri_G When I want to run either 3.x or 4.x code, I start Codea and tap on the gear icon (top right of screen) and then select either 3.x or 4.x from the Runtime depending on what I want to run. I’m not sure what the require legacy thing is supposed to do.

@dave1707 - thanks for that, hadn’t even noticed that - it will make it much simpler for me now.