- Home /
Applying physics on an object
I am writing out a movement demonstration in itween where an object (in my case its a Quarter) needs to be flipped back. Here is a diagram that helps visualize it:
To rotate the object I am using itween and I am rotating it on its x axis.
var props = new Dictionary<string, object>();
props["x"] = -180;
props["time"] = 1;
props["name"] = "FlipCoin";
props["easetype"] = iTween.EaseType.linear;
props["looptype"] = iTween.LoopType.pingPong;
props["oncomplete"] = "PauseTween";
props["oncompletetarget"] = _coinObject;
iTween.RotateAdd(_coinObject, new Hashtable(props));
The issue I am having is that the object is just rotating in place (on its center). And in order for it to rotate correctly I have to have it literately floating on the table cause otherwise it just twitches. Another thing is that I am using rigidbody on it and I have gravity off because for some reason when I had gravity the quarter did not want to move.
Can anyone help me figure out how to set the pivot point of the quarter so that it flips while its on on the table and is not floating in space? Thank you all in advanced!
Your answer
![](https://koobas.hobune.stream/wayback/20220613133132im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Using iTween for custom variables 3 Answers
A node in a childnode? 1 Answer
How to control a game object's movement in iTween 1 Answer
how to loop an animation 2 Answers
Distribute terrain in zones 3 Answers