Last visited

About karylo

I have a solid particle system of particles arranged in a spherical formation with a universal camera at the center.
I should be able to pan or tilt the camera 360 degrees in any direction and still see the particles meant to represent a starfield.
But what I find is that when panning or tilting, after a certain amount the particles suddenly disappear and do not reappear until I pan or tilt back again.
I don't understand why that would happen, and it doesn't seem to happen with the ArcRotateCamera.
Would anyone have an idea what is going on with this?
http://www.babylonjs-playground.com/#WG9OY#175

My question has to do with how to generate a vector from a point to the nearest point on a plane. If I have a mesh moving inside a box, I want to know the distance and direction from the mesh position to each side of the box. I understand that would be a vector perpendicular to the plane that intersects the point.
Does Babylon have a method that will do that for me? TIA

A newbie with CannonJS, I want to have spheres collide with elasticity such that there is no loss of kinetic energy.
All the spheres have the same physicsMaterial and the ContactMaterial has friction = 0.0 and restitution = 1.0.
I was hoping that would give me 100% elastic collisions yet I see that the spheres lose significant energy with every collision.
Is there something else I could or should be doing? TIA
// Create a slippery material (friction coefficient = 0.0)
// and very bouncy (restitution coefficient = 1.0)
var physicsMaterial = new CANNON.Material("bouncyMaterial");
var physicsContactMaterial = new CANNON.ContactMaterial(physicsMaterial,
physicsMaterial,
0.0, // friction coefficient
1.0 // restitution
);
// We must add the contact materials to the world
world.addContactMaterial(physicsContactMaterial);
// CANNON body
this.body = new CANNON.Body({
mass: this.mass,
position: this.loc,
shape: new CANNON.Sphere(this.radius),
velocity: this.vel,
linearDamping: 0,
material: physicsMaterial
});