0
$\begingroup$

I want to create a object the moves on a path or curve but its motion is determined by physics not keyframes.

So for example if the curve goes down the object would increase its speed or if the curve gets more steep it would decelerate. I also want to create acceleration points that accerlerate the object articfially like a boost field in a racing game.

Any ideas?

Thank you

$\endgroup$

2 Answers 2

1
$\begingroup$

This is an interesting question, and there is probably a better way than what I'm going to suggest. But in the absence of another answer, one way you could approach it is to actually just simulate everything, including the curve that needs to be followed.

Let's say you want your object to follow a curve object. Make your curve into a tube - in the Curve tab, under Shape, set Fill to "Full"; under Geometry, set the Bevel depth and Resolution to values that give you the kind of tube you want. It's going to have to be the kind of tube that, in the real world, a marble would roll down, i.e., it's going to have to start relatively high on the z axis and slope down overall, although there can be sections with upward slopes.

Convert your curve to a mesh.

Make a ball object (e.g. a round cube). Scale it to fit comfortably within your tube. Put it at the start point in the tube.

Enable rigid body physics for the ball and the tube.

  • Ball:in Physics tab, under Rigid Body, set Type to Active; under Rigid Body Collisions, set Shape to "sphere"; set Friction and Bounciness to zero; under Rigid Body Dynamics, set Damping to zero for Translation and Rotation

  • Tube: in Physics tab, under Rigid Body, set Type to Passive; under Rigid Body Collisions, set Shape to "Mesh"; set Friction and Bounciness to zero.

If you set your simulation going, the ball should roll along the tube, obeying gravity and angular momentum. However, I've found that even without friction and damping, the ball loses momentum over time and can't climb small hills it should be able to climb. The ball kind of bounces around in the tube which is partly impacted by the tube geometry, I have not found a way to really eliminate the bounciness. Adding geometry to the tube only seems to make things worse.

Now, parent whatever object you actually want to animate to the ball. This object shouldn't have any physics on it.

I have tried playing around with acceleration points using empty objects with Wind force field physics, but this has been . . . well it's fiddly. Getting the strength and falloff right seems to be quite difficult.

Alternatively there is a "Curve Guide" type of force field, which can be set only for curve objects. However this force seems to affect only particles . . . which is fine, you can create a particle system with a single particle and it is affected by the curve guide field. The bigger problem is getting the curve guide force to integrate with gravity and angular momentum, and that may be . . . well I haven't had any luck.

$\endgroup$
0
$\begingroup$

A) Turn the object towards the target

B) Apply a force to move the object forward

Any other forces (like gravity, collisions, friction) will still take place.

$\endgroup$
2
  • $\begingroup$ Hmmm that doesn't seem to work gravity still drags the object down and it is not following the path. $\endgroup$ May 16, 2017 at 14:49
  • $\begingroup$ You asked for "motion is determined by physics". Physics considers all forces. Especially I guess you need to keep the object somehow on proposed path (like trails). $\endgroup$
    – Monster
    May 17, 2017 at 4:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .