Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: Stick car to varied ground?

  1. #1
    digital witchdoctor objuan's Avatar
    Join Date
    Nov 2003
    Location
    Denver, CO
    Posts
    524

    Stick car to varied ground?

    I know I've seen posts on this before, but searching isn't quite bringing it up for me like I hoped.

    I have a car on a road that ramps up and down a little bit. How can I just animate the car's center null in X and Y, and automatically put it's Y on top of my road mesh? And preferably also adjust pitch?

    Thanks!
    Ocean Byrne
    humble pixel farmer
    www.moceandesigns.com

  2. #2
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Near Beaverton, OR
    Posts
    1,343
    You might look into RayCast, but your best bet assuming you've LW 2018 is to examine the car scenes under Bullet_Dynamics folder.
    "Never be a cat in a cartoon. Never." Chief Wiggum

  3. #3
    Registered User
    Join Date
    Jan 2005
    Location
    Colorado Springs
    Posts
    1,792
    If you choose not to use Bullet for the collision detection, using RayCast Geometry is fairly straightforward.

    1) Keyframe your car's Y position above the road at all points and the X,Z positions to define its path across the surface
    2) Use RayCast Geometry to detect the road
    3) Use the ConvertHitNormalToHPB node to convert the RayCast Geometry Hit Normal output to Heading, Pitch and Bank on the car

    I normally extract the Pitch and Bank using Vector Scalar nodes, and use Align to Path to control the vehicle's Heading.

    Using Bullet Constraints as in the example LW2018 scenes will probably give a more realistic scene if you want / need the wheels to adjust individually to the variable ground.

    The ConvertHitNormalToHPB node is in the LW2015 content under Nodes=>RayCast Assist=>RayCast-NodalMotion folder, but doesn't appear to be included in the LW2018 content.

    mTp

  4. #4
    Remember Wade's Avatar
    Join Date
    Feb 2003
    Location
    Cypress Texas
    Posts
    1,385
    Others have done a good job of it - https://www.youtube.com/watch?v=spDHrFATxXI but this is past my knowledge. Looking forward to seeing where you take it.

    AND THIS GUY!
    Last edited by Wade; 08-13-2018 at 09:18 AM.
    Shuttle XPCVista 64 bit /Core2Extreme x9650 3.00GHz 8GB GeForce 8800 GTS 512 Cintiq 21UX
    Dell 24" LCD Dell XT2 Tablet /Win 7 32 Bit /Core 2 duo SU9600 1.6 GHz 3GB / Mobil Intel 4500MHD

  5. #5
    digital witchdoctor objuan's Avatar
    Join Date
    Nov 2003
    Location
    Denver, CO
    Posts
    524
    Mine will be nowhere near as cool as Dr Melon there. That is a nice rig, and a cool model. Thanks for the tips y'all.
    Ocean Byrne
    humble pixel farmer
    www.moceandesigns.com

  6. #6
    ack ack Markc's Avatar
    Join Date
    Feb 2006
    Location
    England
    Posts
    1,354
    Rebel Hill has some tutorials (but they are not free).
    Available on Liberty 3D website......

    Click image for larger version. 

Name:	car.jpeg 
Views:	96 
Size:	226.9 KB 
ID:	142497
    Mac Pro (2010) OSX 10.13 RX580 Pulse LW2019

  7. #7
    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  8. #8
    areté adk's Avatar
    Join Date
    Feb 2003
    Location
    Melbourne
    Posts
    1,505
    Quote Originally Posted by erikals View Post
    Oh cool ! Didn't even know this was available. I really need to go through ALL the tools Oliver has
    He's so prolific that it's hard to keep up.

  9. #9

    he's a Coding Monster!  

    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  10. #10
    Axes grinder- Dongle #99
    Join Date
    Jul 2003
    Location
    Seattle
    Posts
    14,726
    Excellent thread!
    They only call it 'class warfare' when we fight back.
    Praise to Buddha! #resist
    Chard's Credo-"Documentation is PART of the Interface"
    Film the cops. Always FILM THE COPS. Use this app.

  11. #11
    Super Member XswampyX's Avatar
    Join Date
    Aug 2010
    Location
    Kernow
    Posts
    2,072
    Bullet will do it!



    Here's the scene. I've added in some steering, just rotate the null "steering".
    Attached Files Attached Files

  12. #12
    Carbon fibre dongle® 50one's Avatar
    Join Date
    Jan 2011
    Location
    Honeycomb hideout
    Posts
    2,384
    Oddly enough, that's quite entertaining to watch Swampy

  13. #13
    Super Member XswampyX's Avatar
    Join Date
    Aug 2010
    Location
    Kernow
    Posts
    2,072
    Quote Originally Posted by 50one View Post
    Oddly enough, that's quite entertaining to watch Swampy
    Ta!

    I left a lot of the bounce in so you could see that it was working, but then it came out almost like it was a cartoon animation, also the poor old cart is a slave to gravity. It has no input into this scene.

    Poor old bouncy cart. :-D

  14. #14
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Near Beaverton, OR
    Posts
    1,343
    Quote Originally Posted by 50one View Post
    Oddly enough, that's quite entertaining to watch Swampy
    Ya, wasn't exactly a Test test, but then once ya get playing with Bullet, these things happen.
    "Never be a cat in a cartoon. Never." Chief Wiggum

  15. #15
    areté adk's Avatar
    Join Date
    Feb 2003
    Location
    Melbourne
    Posts
    1,505
    Hot diggity damn XswampyX that looks very fun to play with ... gotta check that out when I have time

Page 1 of 2 12 LastLast

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
  •