1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transform GameObject on Instantiate

Discussion in 'Programming/Internet' started by Jesse Williams, Oct 8, 2018.

  1. So, I'm having a bit of an issue with transforming a GO after instantiation in the way that I want.

    I have a main GO. On death, it spawns secondary GOs. All GOs involved are kinematic (because the AI controller moves them). So I use lerps to move the secondary GOs on instantiation in a sort of fountain pattern. However, because of the static movement, they get pushed through walls and other surfaces.

    I thought I'd try using physics for this with a ForceMode.Impulse push, but to do that I have to make it non-kinematic. To do that, I also have to set it's mesh to be non-convex. Making the mesh convex causes a ~1000ms delay on instantiation while the PhysX engine parses the mesh.

    So... what other options do I have? Is there any other way to use the basic transform lerps and still have it not pass through walls? I'm assuming that the direct transform is causing collision to not happen. Or maybe because I'm disabling the CharacterController until it reaches it's end position (otherwise it tries to move right away using AI).

    Login To add answer/comment
     

Share This Page