Results 1 to 5 of 5

Thread: How does 'RayCast-ConvertHitNormalToHPB.nodes' work?

  1. #1
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    6,989

    How does 'RayCast-ConvertHitNormalToHPB.nodes' work?

    Today I was looking into using Raycast to make a vehicle stick to some irregular terrain. Using the 'RayCast-ConvertHitNormalToHPB.nodes' setup from Content, I got it to kinda work. I looked at the Compound node to see how it works but I'm completely lost. Can somebody tell me in simple words what the nodes in this setup are and how they work to perform their magic?

    Questions after that:

    1. After adding the ConverHitNormalToHPB node, my test vehicle's heading changed 90 degrees. Otherwise, it follows the terrain, but how do I correct the heading short of rotating the object in Modeler?

    2. Can Raycast work with Spline Control? I didn't have any luck with this in my tests and I don't see Spline Control being used with Raycast in any of the Content examples. Is the solution to bake the Spline Control animation before using Raycast?

    3. Is there a simple-ish way to get a setup for wheels that stick and spin, with a separate body that has 'suspension' animation. I don't need or want real dynamics, I just want to add some keyframed bounce and roll animation as needed. I have some ideas for this but they're not really simple. Just wondering if I'm not over-thinking this.

    Thanks for any helpful info.

  2. #2
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    6,989
    Oh, wait...I just thought of a dumb way to make this work: I can make a rigid proxy object with four 'wheel' contact points that follow the terrain using the ConverHitNormalToHPB node, and just parent the vehicle with its rig to the proxy. Then I can add whatever animation want to the car and it will still 'follow' the terrain. Duh.

  3. #3
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    6,989
    That said, I'm still interested in any answers to my original questions about how the ConverHitNormalToHPB node works and how to correct the heading offset in Layout.

    Thanks!

  4. #4
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    6,989
    Hmmmm....spoke too soon. The ConverHitNormalToHPB node doesn't just offset the heading, it overrides it entirely.

    I thought I had this figured out when I simply added 90 degrees to H at the end of the node structure, which worked but then I noticed the proxy always faced that direction without changing. When I removed the addition, the correction was gone but the heading was still not changing. So I disabled the ConverHitNormalToHPB node and the heading rotation is back again.

    Ugh. Back to square one.

  5. #5
    Eat your peas. Greenlaw's Avatar
    Join Date
    Jul 2003
    Location
    Los Angeles
    Posts
    6,989
    Still not successful but here's what I tried next:

    I used Item Info and plugged its Rotation output into an HPBAdd node and added the ConverHitNormalToHPB node's output to that. Then the result was plugged into NodalMotion's Rotation My thinking was that since only the heading animation is coming from the object, it will add to the heading coming from the ConverHitNormalToHPB node. Unfortunately, now I'm not seeing any rotation coming from the ConverHitNormalToHPB node...it seems like the Item's HPB is now overriding that.*

    I need to get this done so, for now, it looks like I'm going to brute force it.

    But for future reference I'm still interested how I can make this work. Thanks in advance for any advice!

    *Edit: No, the description above isn't quite right. The rotation is just all wrong, so I must be breaking something. I was hoping this would be a quick and easy solution but it looks like I need to spend more time studying this later.

    At the moment, I think I understand why my setup is wrong; just not sure how to make it right.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •