Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Water wheel physics?

Discussion in 'Physics' started by BedrockBoy2006, Jan 12, 2024.

  1. BedrockBoy2006

    BedrockBoy2006

    Joined:
    Jan 12, 2024
    Posts:
    2
    so im trying to make a game where you can create a rube goldburg machine but when trying to make my pinwheel. waterwheel, cross whaterver you want to call it i ran into an issue that is not going away.
    simply put i have a code that lets you move pieces around but when i attempt to move the wheel it just spins because its using hinge joints to spin freely so i made a script to make it kenimatic when i move it but when i make it not kenimatic it moves itself back so how would i move the ancher with it or am i missing something?
     
  2. Ambrose998800

    Ambrose998800

    Joined:
    Jun 23, 2015
    Posts:
    74
    What piece are you moving exactly? The hinge joint anchor, the wheel? You should move the gameobject transform where the rigidbody is added on, on which the hinge joint is attached to.
     
  3. BedrockBoy2006

    BedrockBoy2006

    Joined:
    Jan 12, 2024
    Posts:
    2
    its a bit difficult to explain but while the game is running i want to be able to move the wheel to a different spot on the screen and still have it spin as normal so right now i am moving both the anchor and the wheel in kenimatic mode which works fine but when i switch it to non-kenimatic mode it goes back to where it was and will only spin if i try to move it i dont know if i can really explain it that well but if theres some way to send a vidoe of whats hapening id gladly do so also i should mention im very new to unity and am mostly using AI to fix problems with my code and try to learn from it if i can but i still dont know what im doing for the most part
     
  4. Ambrose998800

    Ambrose998800

    Joined:
    Jun 23, 2015
    Posts:
    74
    Please do 3 pictures: 1: the wheel setup in editor mode, 2: the wheel while you are moving it in runtime and 3: the wheel after releasing it in runtime.