Hello prisoner849…IT Looks Like you are.really a Champion. So the.problem ist Not the pole…IT IS more the Skill Level of me😔. Thanks for your Help and the Code snippet. I Take IT from the codepen !
Hello Prisoner849, i did a lot and it works with my idea of a basic functionality. As you can see in the picture - it does not look perfect.
But could you please help me in two aspect:
- i used some planes to simulate the part of the table with the goal. now i got some new problems concerning the length. Would you use the planes to or would you use a cube ?
- i count a goal when the my figure is close to the ball and that is really bad. Do you have any other idea to make it better - actually i can move the figure from left to right and turn it for 360 but is there a possiblilty to work with the ring (or the base) of the figure ?
thanks for you help again
I’d go for cubes (having different x, y, z dimensions) just in order to simulate the “pole” bearings, but allow to look above the cube’s top level.
but is there a possiblilty to work with the ring (or the base) of the figure ?
Now you’re about to enter the realm of physics ![]()
“angle of incidence equals angle of reflection”.
If you want the action to be dependant on the lower ring, remember, that the contact points of the lower ring rotate on a circular (cylindrical) surface about the axis of the pole.
Work from there.
okay..“ich stehe auf der Leitung gerade”..do you have a snippet for the cube…because i would like to have “open” at the top …
hey, got it with the cube…but it does not look better ![]()
Well..in a way i am stupid…i did not get the right solution:
wall left and right
wall at the back
wall at the bottom
and everything combined as an cube.
// walls
const planeTop = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: egcColor } ) );
planeTop.position.y = 100;
planeTop.rotateX( Math.PI / 2 );
scene.add( planeTop );
console.log("Top: ", planeTop.position);
const planeBottom = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: egcColorTableFloor } ) );
planeTop.position.y = 0;
planeBottom.rotateX( - Math.PI / 2 );
scene.add( planeBottom );
console.log("Bottom: ", planeBottom.position);
const planeRight = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: egcColorTableSides } ) );
planeRight.position.x = 75;
planeRight.position.y = 50;
planeRight.rotateY( - Math.PI / 2 );
scene.add( planeRight );
console.log("Right: ", planeRight.position);
const planeLeft = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: egcColorTableSides } ) );
planeLeft.position.x = - 75;
planeLeft.position.y = 50;
planeLeft.rotateY( Math.PI / 2 );
scene.add( planeLeft );
console.log("Left: ", planeLeft.position);
const planeBack = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: egcColorTableFronts } ) );
planeBack.position.z = -50;
planeBack.position.y = 50;
planeBack.rotateY( Math.PI );
scene.add( planeBack );
console.log("Back: ", planeBack.position);
const planeFront = new THREE.Mesh( planeGeo, new THREE.MeshPhongMaterial( { color: egcColorTableFronts } ) );
planeFront.position.z = 50;
planeFront.position.y = 50;
planeFront.rotateY( Math.PI );
scene.add( planeFront );
console.log("Front: ", planeFront.position);
I suggest you completely forget about all that “plane” stuff.
Have a look at BoxGeometry which allows you to specify width, height and depth all within one single line of code.
Thx…i used IT before but i Had some Problems with transparent (opaque?) top …
But anyway…i will Change IT soon. Thx.
This phrase explains nothing.
Have you tried to use material.side = THREE.BackSide on material(s), when you used BoxGeometry?
hey there, i am still working on my game and things going on. I designed the code more in an object-oriented way (thanks to prisoner) so i got some classes for game, ball, table. But at the moment i got a few problems where i can need some help.
first - it looks in that way:
but because of the problem with the plane i changed it to cubes and it looks in that way:
But here are my problems:
- the backside should be a little bit broader (as you can see in the picture above of the original table)
- on the backside i want to make a scoreboard (as you can see in the picture1 - there i add some stars for goals (still working). How can i put fix ON THE BACKSIDE so it change the position WITH the table (group?)
- On the backside i want to make a goal (as you can see in the picture 1) - i should be on the frontside of the backside of the table.
- When i get the page, the table should be much far away…can i changed it with the camera-perspective ?
Any help is appreciated…i am lost in the momen.
When I suggested to use THREE.Cube instead of THREE.Planes, I was thinking of using a distinct cube for each wall (side, goal, ground), which would give each wall a distinct thickness, width and length, just like in real world, and also distinctly configurable.
You would also be free to make the goal wall wider (or thicker) than the side walls. And the question of frontside vs. backside would be more obvious to resolve.
ahh…okay. well…in that case i would combine each cube to a corpus in whole for the table. But do you have a snippet because i still got problemes with grouping isolated geometries to a consistent element in whole ?



