- Home /
throwing a ball camera position changes
ball.useGravity=true;
ball.velocity=transform.TransformDirection(0,yvel,zvel);
In my scene balls start position is always next to camera. when user touched on the ball user make shot . I am using codes above for throwing ball from a certain ball and hoop place. It works fine (at least physic works fine). But My question is , when the cameras position changes in the scene, the ball's position is going to be changed as well. so what code should I use to make throw the ball to the hoop ? how to calculate? (I change cameras position with the device acceloremetre on iphone )
Thanks in advance
Comment
Your answer
Follow this Question
Related Questions
Change position - cameras - slider 1 Answer
How can camera Forward Or How to change position of camera? 1 Answer
Move camera upon button press 0 Answers
switch character 1 Answer