Steve and I were consulting yesterday and I think his question was answered.@polygame
There is definitely a way, because Pinevent uses BAM "playfield size" and "ball position",etc to do SSF (surround sound feedback) for (5.1/7.1) 3D Positional Ball Rolling Sounds. (unlike smoke's which is only stereo).
As the others said. @Gimli would know better than us.
Dim BallTrajectory Sub NewtonPhysicsTick() BallTrajectory = Atn2( xBAM.Ball.Velocity.X, xBAM.Ball.Velocity.y ) Dim ball Set ball = xBAM.BallCloseTo(0,0) AddDebugText "ball.Speed: " & ball.Speed AddDebugText "xBAM.Ball.Velocity.y: " & xBAM.Ball.Velocity.y AddDebugText "xBAM.Ball.Velocity.X: " & xBAM.Ball.Velocity.X AddDebugText "xBAM.Ball.Position.X: " & xBAM.Ball.Position.X AddDebugText "xBAM.Ball.Position.Y: " & xBAM.Ball.Position.Y AddDebugText "BallTrajectory: " & BallTrajectory End Sub ' Convert X, Y velocities to ball trajectory angle Const RadToDeg = 57.295779513082320876798154814105 Function Atn2(x, y) If x > 0 Then Atn2 = Atn(y / x) * RadToDeg ElseIf x < 0 Then Atn2 = 180 - RadToDeg * Atn(y / -x) ElseIf y > 0 Then Atn2 = 90 Else Atn2 = -90 End If Atn2 = Atn2+90 End Function
not working here??? what do I do wrong? Everything is check properly
Edit* Got it to work but, the camera is moving along and if I lock it.. no more ball roller.
What a sad implementation of something that could be useful.