Will do … although it is nowhere near as far along as the Need for Speed demo…
It’s a top down, racer with custom physics (mass spring system)… I am focussing on high frame rates and smooth gameplay, with analogue input (gyro, accelerometers, mouse) for a nice driving feel… cross platform obviously. I have one commercial game under my belt written with Direct X (QuickSnooker.com) but it is hamstrung by being PC only in an increasingly mobile world.
Lots to like about Babylon, have hit a few performance issues but nothing insurmountable, subdividing meshes should help, but that has broken picking at the moment, so I need to work out how to find the submesh from the subdivided mesh with ray picking … will ask more clearly if I get really stuck.
Very impressed by your dedication the the cause, I hope I can build something that does it justice.
I am (I think) in the exact same issue. I need to add a sphere where the user clicks. I tried the following option :
var ballPos = BABYLON.Vector3.Unproject(
new BABYLON.Vector3(scene.pointerX,scene.pointerY,1),
engine.getRenderWidth(),
engine.getRenderHeight(),
BABYLON.Matrix.Identity(), scene.getViewMatrix(),
scene.getProjectionMatrix());
But the coordinates are really weird (like thousands or so)…
I thought about an option where I link a transparent plane end get the picked position but it’s seems a bit goofy.
The size of the result is related to the z-value of the source.Using a value smaller than 1 will get better results, or just normalize the result, then scaling to the size you want: