Take the 2-minute tour ×

Well as the title says i want to make a pool cue that will actually hit the balls on my table. I have made the billiard table and the balls. The problem is i cannot think of how to attach the cue to my arm so that it can hit the balls. I know that attached objects cannot invoke collisions so i shouldn't attach it? I am bit stuck.. Does anyone have any idea? Thanks a lot!

share|improve this question
Try asking in the SLHelpDesk group if you can't find an answer anywhere else. They have some folks who are great with scripting and building. –  Tom Feb 17 '12 at 21:54
Thanks for your quick comment Tom. You need a second life account to ask them or there are specified forums? The thing is i don't have a second life account. I work with OpenSim. –  Pantheo Feb 17 '12 at 21:58
You can get a SecondLife account free here: http://join.secondlife.com/?lang=en-US. It would be worth having if you plan on interacting with the SL Community. –  seanbreeden Feb 18 '12 at 14:16
Please complete if this question has been answered :) –  AbstractChaos Apr 24 '12 at 13:48
add comment

2 Answers

It depends on the objects settings, for example if the attachment is phantom or you have set llVolumeDetect(true) see Collisions.

My thoughts on this would be to use camera point and click and pass angle and force info onto the ball and let it figure out where to go.. the cue would simply would then just be an animated attachment with a bit of camera controls... therefore no need for collisions.

As a side note having the balls set as physical would be they can detect a collision with each other and react and would react with the non physical table too.

if you provide a bit more detail on the settings i will be able to be more specific :) hope this helps

share|improve this answer
Thanks for your relpy. What i did is this. I made the attachement (aka the cue) a gun which fires invisible projectiles. The projectiles then hit the balls, which are already be set to physical, and the balls move. Since the whole thing is done in mouselook it looks realistic enough. –  Pantheo Mar 3 '12 at 17:06
Yes that should work, however firing projectiles to hit little ball's would have to be extremely accurate taking into account the Avatar height but that is doable it does just all boil down to the maths involved. Using the suggestion above would simply pass on the info with a llCastRay to the first intersection and send the force angle (ie. position of Avi) to know which direction the ball has to go... Relying on SL physics may mean your pool balls don't roll as far as you would hope unless they have made it better recently. –  AbstractChaos Mar 5 '12 at 11:17
add comment

You'll want to use llCastRay instead of shooting physical objects. You can still calculate impact and forward that as a message to the balls.

share|improve this answer
add comment

Your Answer


