MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

Vehicle simulation - target effector not keeping up?

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Sanford Tong
Vehicle simulation - target effector not keeping up?
on Jan 30, 2018 at 12:15:32 pm

Hello there! This is probably a newbie question:

I've been exploring the best way to simulate a car driving along a path whilst preserving the natural reactions to bumps and contours that dynamics provides. This seemed to rule out 'Align to Spline', and I've also tried to use mograph Spline effector, but found this didn't seem to exhibit natural behaviour when, say, falling off a cliff.

My journey has now taken me to try rigging a simply vehicle using hinge connectors for each wheel, putting it into a mograph cloner, then using the Target effector to try to point the car's chassis in the direction of a moving target whilst motor spin the rear wheels. By going this way I was hoping for it to simulate slides etc when the angle changes dramatically based on the target object's location, whilst falling properly, and so on.

The attached file is where I got to. It seems to almost do what I was intending, but the chassis doesn't seem to remain solidly pointed at the target. I have set the Chassis' Follow Rotation setting to maximum (100) which gave it the closest result, but still not good enough.

If anyone is able to spot what I might need to do, or otherwise point me in a much better direction, that would be greatly appreciated. Thanks in advance!!

12110_exampletargeteffectortest.c4d.zip

Regards,
Sanford.


Return to posts index

Brian Jones
Re: Vehicle simulation - target effector not keeping up?
on Jan 31, 2018 at 3:22:37 pm

remove all the friction from the wheels and the body does point at your target - it just doesn't move since there is no friction. While the tag says to point at the target, the wheels are driving it forward (straight, ignoring the target). Either you would have to point the front wheels at the target or reduce friction so that the car still moves but it's not so resistant to the change of direction the target is trying to cause (just a guess)


Return to posts index

Justin Thomson
Re: Vehicle simulation - target effector not keeping up?
on Jan 31, 2018 at 4:24:49 pm

Typically a car turns based on the angle of the tires. The tires in you scene do not, see if you can get the tires to rotate based off the spline curve.


Return to posts index


Sanford Tong
Re: Vehicle simulation - target effector not keeping up?
on Feb 1, 2018 at 1:08:43 pm

Thanks for your replies!

I did try turning the front wheels separately (with the motor applied only to the rears) but the vehicle seemed to stop moving when I did that (it wobbled, so it was trying to do something, but couldn't quite tell how it was getting stuck). I did also play with the friction settings, but then I couldn't get the vehicle to take off properly.

I'll give it another play, and see if I can find a balance that works. Thanks!


Return to posts index

Sanford Tong
Re: Vehicle simulation - target effector not keeping up?
on Feb 1, 2018 at 1:24:55 pm

Hello again...

I've been playing with trying to rotate the front wheel to face the target, again using a target effector. I assume you need the Mograph cloner to do that. The problem I'm having then is that I can't seem to get the hinge joint to rotate along with the wheels. As a result, the vehicle goes in a straight line anyway, regardless of the rotation of the front wheel. I've tried variants of nesting the hinge (inside the cloner grouped with the wheel itself, outside the cloner) and none of the combos seem to work.

Is this the point I should start thinking about Xpresso instead of a target effector? I was hoping for a shortcut! ☺

Thanks again,
Sanford.


Return to posts index

Brian Jones
Re: Vehicle simulation - target effector not keeping up?
on Feb 1, 2018 at 4:52:02 pm

no solution yet but no, you don't need a cloner to do this - if you remove the cloner and use a Target expression on the Car object you get the same movement


Return to posts index


Sanford Tong
Re: Vehicle simulation - target effector not keeping up?
on Feb 2, 2018 at 12:12:22 am

Thanks for the tip Brian - for some reason I was under the impression that the dynamic properties got lost without using mograph. That simplified things a lot!

For anyone interested, the solution was pretty simple in the end. Rather than turning the wheels, I just applied the target expression on the chassis, and made the wheels/connectors a child of the chassis instead of being grouped to the chassis. This seems to work regardless of friction level on the wheels, and although not realistic for closeups, is perfectly fine for the dinky toy animation I have in mind.

Thanks all for your help!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]