Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

How to move the position of Collider in VFX Graph?

Discussion in 'Graphics Experimental Previews' started by VJFader, May 31, 2019.

  1. VJFader

    VJFader

    Joined:
    Dec 11, 2018
    Posts:
    8
    I have been trying to change the center of the Collider (Cylinder) by passing new Vector3 values, but can't seem to be able to move it at all. See attached screenshot.
    For example I want to assign the collider center position to a game object that is moving. When I change the mode from World to Local, the collider cylinder visual reference disappears in the Scene window, not sure what's going on there.
     

    Attached Files:

  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    307
    If you want to use a game object to drive the cylinder center, the cylinder should be in world.

    This is supposed to work, either you call directly the SetVector3 function directly on the Visual Effect component or you can use a Parameter binder to do it for you without having a script to write.
     
  3. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    Hi @JulienF_Unity, I'm also trying something similar, tethering the collider to a VR controller and can't get it working.



    I've tried adding the vector 3 parameter directly to the collider position, putting it through a change space node, switching Update to world space. None of which has worked so far for me, any ideas what I'm doing wrong?
     
  4. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    307
    Are you sure you're left hand Pos should be in fx local space?

    Basically I guess the controller pos is expressed in world space, so if your system is in world space, you dont need any transformation. Just make sure the cylinder space is in world too (which is not the case in your screenshot)
     
    Last edited: Jun 4, 2019
  5. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    Ah yes right you are, I assumed you set it to world space using the icon on the context block, I didn't notice the smaller icon on the collider. Is there a way to rotate the collider or can you only set it's center currently?
     
  6. VJFader

    VJFader

    Joined:
    Dec 11, 2018
    Posts:
    8
    @JulienF_Unity, it does seem to work using World position during Play mode.

    what gave me the impression that it was not working is, in Scene window it won't preview the position of the collider if the value is changed from VFX Parameter Binder.
     
  7. JackDDeane

    JackDDeane

    Joined:
    Aug 6, 2018
    Posts:
    26
    Yeah it's very hard to work out the area of effect without a bounding box, also the collision object doesn't have any options for rotation. Is there any way to be able to effect the rotation of the collision object?
     
  8. adam_unity450

    adam_unity450

    Joined:
    Aug 3, 2020
    Posts:
    12
    At the risk of resurrecting an old thread: is there still, in 2021, no way to rotate the cylinder?