edited June 2014 in ORK Support
I'm attempting to disable/enable Gravity on an actor or prefab using the Change Fields Node/Call Function Node; but for some reason, using:

Component Name = Rigidbody
Field = useGravity
bool

isn't working at all.

I'm pretty sure I'm making a pretty dumb designer-y mistake as I vaguely remember accomplishing this before, but does anyone have an idea on how to disable gravity via Event Nodes?

Post edited by gamingislove on
Tactics RPG Grid Battle System for ORK
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
  • edited June 2014
    Have you tried enabling Is Property?
    Usually, the exposed fields of Untiy components are actually properties :)

    Also, do you get a warning message in the console?
    Post edited by gamingislove on
    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!
  • edited June 2014
    Hmm, I did try Is Property; got the following:

    Property change failed (UnityEngine.Rigidbody): useGravity
    Exception has been thrown by the target of an invocation.

    Without Is Property, I get:

    Field not found (UnityEngine.Rigidbody): useGravity
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • Ok, seems like that's happening when there is no rigidbody attached to the object ...
    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!
  • edited June 2014
    *slaps forehead*

    Yeah, I'm just an idiot.

    Looks like I took the Rigidbody off the prefab and accidentally applied it while experimenting and trying to figure out the problem and looking at different nodes. Silly.

    You were correct; it is a property, and it's working perfectly now. Thanks!


    For future reference for anyone else:


    Change Fields Node
    Component Name = Rigidbody
    Field = useGravity
    Is Property
    bool


    will toggle gravity.
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
Sign In or Register to comment.