I’m working on a 2D project where I have a circular rotating disk with a stone on it, I’m attempting to throw the stone when a key is pressed.
this is the script for stone object,
rb = GetComponent<Rigidbody2D>();
Vector2 testAngle = transform.position - transform.parent.position;
rb.velocity = testAngle.x;
problem is the stone is just moving in a strightline without bending beacuse of parent spinning.
I don’t think that is happening because of object spinning. Stop the spinning disk and try throwing it. If it works then u have to detach stone from disk while throwing it. If the stone still goes in a straight line even after throwing check the gravity of stone. I assume you are not applying velocity in Update(), the stone will go straight if you apply velocity continuously. Check all above possibilities and still if you have the problem, you need to provide some more details.