Search Unity

This may be a stupid question...

Discussion in 'Editor & General Support' started by FancyPants, Jun 30, 2005.

  1. FancyPants

    FancyPants

    Joined:
    Jun 30, 2005
    Posts:
    38
    Hi all.

    I just downloaded the demo version of Unity and have been playing with it. I must say, it is quite nice! I can't wait to really sink my teeth into it!

    I finished thee tutorial (with the marble stuff), and I have a question about the physics end of things. I noticed that when the marbles move, they don't roll. They just sort of slide along the ground.. Is there a way to fix this? Am I doing something wrong?

    Thanks in advance,
    --Thomas
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    The script used for the marble is a first person shooter script.
    You will want to modify it a bit more to make it more marble like.
    The fps script has a variable called freezeRotation which it sets at startup. You should comment out that line.
     
  3. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    You'll want to use the first person roller script (FPSRoller) for the player marble. It's a slightly modified version of the fps movement script.

    The enemy marbles don't require a script to roll when they drop or collide with things, just their basic physics settings and they should roll fine. You can PM or email me if you need more help!

    Krispy is the one who provided me the answer for this one ...

    :) Thanks, Krispy!
     
  4. FancyPants

    FancyPants

    Joined:
    Jun 30, 2005
    Posts:
    38
    I made those changes, and it... go weird. I changed the line to set FreezeRotation to false, and that did nothing. When I changed the line from SetRelativeForce to SetForce, that made the controls get all weird (from relative, to objective... ;)

    Any ideas? I'm going to keep plaing with it, and reading through the scripting guides some more, but i would love some more feedback.

    Thanks,
    --Thomas
     
  5. NicholasFrancis

    NicholasFrancis

    Joined:
    Apr 8, 2005
    Posts:
    1,587
    Adding the forces in world space assumes that the camera is looking down the positive Z axis. Ideally, the controls should be adjusted to cope with varying camera angles, but that is probably what you're seeing
     
  6. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203