edited May 2014 in ORK Support
I am trying to implement a form of Faux Gravity in my game. The code works fine on it's own but when I plug it into the ORK Framework, it does weird things. I think most of it can be solved by adding my own controller, but my biggest problem is that my interactive controller flies away. Not sure why, does anyone know what is going on with this?

My second biggest question is does anyone know what goes on under the hood as far as gravity and such, is ORK changing the velocity on it's own, because one of the things I noticed is that without the ORK gravity on it doesn't work... which it should since I am pulling it towards it. Any thoughts on how to make gravity work like this?
  • I had some problems with custom controls and IC too... I'm quite unexperienced, but i solved IC strange behaviors removing rigidbody from it...
    About second thing, i didn't understand very well, sorry, but i think (i could be wrong!) ORK gravity is applied at the end, so if it is set to 0, will change back to 0 your own gravity setting...
    As i already said, i'm a newbie to Unity/ORK, i could be totally wrong! :)
  • By removing the rigidbody from the interaction controller, you'll create more problems than you solve :)
    To prevent the rigidbody of the IC from interfering (should also solve the 'flying away'), enable all constraints in the inspector (freeze position/rotation).

    When using your own physics/gravity, you'll need to also use your own controls, own move component in the move AI and probably also need to create custom scripts for moving things around in the event system.
    Turning of the Use Gravity option in the movement steps will prevent using the default gravity, but still wont use a custom one :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Oh.. I thought a rigidbody on the player prefab would be sufficient... Even because my IC, with rigidbody, isn't following it, is just moving little by little from starting position.. I will check it better, thanks! :)
  • For trigger enter/exit stuff to work, there needs to be a rigidbody on at least one of the objects (the one with the trigger and the one entering it). It's best to have a rigidbody on the IC to make it work with everything else, and with all constraints enabled, it wont interfere with movement or get kicked away :)

    When creating a IC with the scene wizard, it'll automatically have constraints enabled.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Constraints are enabled on mine and it still flew away... Maybe I need to implement my own movement and stuff. I think I will work on this later, I want to get some basic rpg stuff working first.
  • Of course, you should also disable Use Gravity and Is Kinematic - if that doesn't help, I'd need to see a small demo project to help you :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • The object I was trying interacting with had a rigidbody, when I removed that it worked fine.
  • Usually that shouldn't be a problem, at least not with the interaction controller. Your IC is set to be a trigger, right?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.