im triing to do a laser chat creats circles that do this:
(e)=>{
scene.addCircle({
airfrictionmult := 1;
radius := 0.2;
density := 1.0;
restitution := 0.25;
friction := 1;
timetolive := 2;
color := [1.0, 0.0, 0.0, 1.0];
pos := e.pos;
edgeblur := 0.5;
restitution := 1((e)=>{
e.other.materialName == "enemy" ? {
e.other.color = [1, 0, 0, 0];
e.other.collideSet := 0
} : {}
})
})
}
but materealname dont work when the spawned circles hit the gometry with matereal name :enemy
why?
xray
can you help me?
im trieing to do do a thing that when a specific poligon touches a specific number of poligons it "unlock" another geometry
thank you!!