# Collison Parabola signature

Hi buddies

I´ve some troubles in instantiate CollisionParabola … someone know how to did it?

Thanx

You can look at the code in direct/src/interval/ProjectileInterval.py; that code creates a CollisionParabola.

David

Hi David

Oh yes … i knew Projective Interval. But for now i´m a little dizzy about how to proceed. I must do:

a) Create a ProjectileInterval and pass it to CollisionParabola as parameter;
b) Create a ProjectileInterval and pass CollisionParabola as node;
c) KISS man, create a CollisionNode “from” and pass it as node in projectileInterval;
d) No man, i´ve another thing 4 iu.

Thanx Again

The CollisionParabola constructor requires three parameters: a Parabolaf object, and t1 and t2, where t1 and t2 are floating-point numbers that represent the start point and end point on the parabola.

The Parabolaf object describes a parabola mathematically, using three points. Its constructor receives three VecBase3 objects, the points A, B, C, and it defines a parabola using the equation P = At^2 + Bt + C.

So, to create a CollisionParabola object, you just create a Parabolaf object using the three points that define an infinite parabola, then specify the range of t that you are interested in with your CollisionParabola object.

If you don’t already know A, B, C, or you don’t know the range of t that you’re interested in, or this math is over your head, you’re probably better off using the ProjectileInterval, which does all of this work for you. The ProjectileInterval constructor takes a variety of different parameters and can construct a parabolic path with pretty much whatever kind of information you have.

David

Ahá! Parabolaf object … yes!
… hey i don´t runaway my old school math classroms
Lot of thanx friend