Hi,

Is it possible to do a Curve Move with collisions enabled? I'm trying to make a skill that makes my character leap to a position, but every now and then the movement just continues directly through the terrain.

Move into direction would probably work, but I don't know how to apply y-axis jumping movement when using that.
  • Curve move only changes the transform's position, which doesn't cause any physics related things (like collisions).

    If the issue is that the end point of the jump isn't on the terrain, you could use a raycast to find the position on it and jump to that.

    Otherwise, using rigidbody nodes for jumping would involve physics.
    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 January 2020
    gamingislove said:
    If the issue is that the end point of the jump isn't on the terrain, you could use a raycast to find the position on it and jump to that.
    How would I use a raycasted position as the destination of curve move? I did a Raycast to Variable node and now I'm wracking my brain trying to figure out how to use it in cuve move node.

    Basically what I want is the player to jump up in the air a specific amount and at the same time move forwards while respecting collisions so he doesn't go through the floor when landing.
    Post edited by pesukarhu on
  • You may want to mess with "Move into direction" instead. You can have one that launches the player up with a +Y / +Z input. And then after that move back down.

    Move into direction uses collision.
    Miuratale : coming 2024
    Miuratale
  • You could also apply physics forces if you use physics.
  • Wrofir said: You may want to mess with "Move into direction" instead. You can have one that launches the player up with a +Y / +Z input. And then after that move back down.

    Move into direction uses collision.
    I swear I tried that before and the nodes played one after another, meaning the player first moved up and after that he moved forwards (and I didn't have any wait boxes checked). I'll try again though.
    hellwalker said: You could also apply physics forces if you use physics.
    Sorry, I was a bit vague. I'm using a character controller so what I need is just collisions.
  • Hm, yeah ... forgot that you can't use positions for the curve move ...

    Your best option is using physics, i.e. having a rigidbody on the game object and applying forces.

    Or, using a combination of curve and physics, i.e. using a curve for the jump up motion and have the fall down be handled by physics/gravity.
    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.