simple roll a ball game - ball slips threw ground
Hey folks. so iam working on this game:
and its almost done. but i have one last bug left:
http://postimg.org/image/h5eiae7j7/
as you can see, the ball is slipping threw the plane. i think its related to my global gravity setting. its Y: -600 but when i change it to something more normal like -10. the ball is just super slow or dosent move at all anymore? the rigidbody of the ball is: mass: 20 - Drag: 0 - Angular Drag: 0,05
but also changing these values to something like mass 200 or 2 doesn't give me the same grip anymore. does anybody have an idea whats wrong?
Answer by G4merSylver · Dec 14, 2015 at 06:50 PM
Not exactly sure, but this looks like an transform.rotation movement, which is anything but working well with colliders. On another note, you can move the ball easier by changing the formula for the addForce, I usually go by multiplying mass and an speedFactor. When the addForce is to low your object nearly wont move.
for the ball? the ball has not movement script. its just a rigidbody. but the ground gets tilted based on where you click
if (Input.Get$$anonymous$$ouseButton(0)) {
RaycastHit hit;
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray, out hit, mask.value))
if (hit.rigidbody != null)
hit.rigidbody.AddForceAtPosition(ray.direction * pokeForce, hit.point);
}
Your answer
Follow this Question
Related Questions
Smooth Walking Inside a Sphere 0 Answers
Adding Gravity to a game object to make a black hole sucking effect. 1 Answer
Space,Gravity,RigidBody,Physics Forces 0 Answers
How to change the gravity of my scene? 2 Answers
Move asteroid realistically in 0 Gravity from hit (impact plus pressure wave) 0 Answers