edited November 2018 in Makinom Support
Gil, I have a question. I have something in mind, but I'm not sure if it's the right way to do it. What's the best way to make a collision effect, for example, if you push a rigidbody object that is laying on the ground with enough force and/or you make it tip to the floor, for the purpose of testing, a dialogue will pop out? You can see such method in a lot of stealth games, for example, Granny.
Using the schematic machine on the rigidbody object, it is easy to do so that when the player came in contact with it, it'll trigger whatever you want it to. The problem is that just a very tiny touch will also trigger the collision schematic. I just can't seem/ or know the best way to make it so that you have to apply a certain force to it. I saw that there is a store rigidbody velocity node. Maybe that's the right node to use, but I'm a little bit confuse on how to make that work.
Post edited by Shadow_Fire on
  • edited November 2018
    I think this is handled by the relative velocity of the collision (according to Unity docs).

    The collision machine stores this as the local Vector3 variable relativeVelocity, which you can change to a float value for easy speed/force checking by using a Vector3 Magnitude node.
    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 November 2018
    Ohh that doc you linked is super helpful. Doing it by script, I easily manage to do what I want. But of course, I'm stumped as how to translate that to Makinom :)
    Is it like this?
    In the schematic, just use one node, the Vector3 Magnitude node.
    Variable key set to storeRelativeVelo
    Origin is global.
    Operator set

    Vector3 type set to Game Object/ Game Object
    Object is machine object(cause the schematic is attached to the machine object.
    Is this correct?
    Post edited by Shadow_Fire on
  • edited November 2018
    No, you'd actually need 2 nodes - the Vector3 Magnitude node only gets you this part here:
    collision.relativeVelocity.magnitude
    You have to check the value afterwards, e.g. using a Check Value node.

    In the Vector3 Magnitude node, you'd first set up the variable settings to define where you want to store the magnitude (float) value. Since it's only there for the check, you'd probably just use a local variable instead of a global.
    In the Vector3 value settings you'd use:
    - Vector3 Type: Vector3 Variable
    - Variable Key: relativeVelocity
    - Variable Origin: Local

    Edit: Actually, I'll make this easier by adding a Vector3 Variable Magnitude float type in the next update, so you can just check the value directly :)
    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!
  • That would be fantastic!
    Do you have an eta of the next update? :)
  • Well, once there are enough features for an update, maybe alongside the next ORK release.
    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.