Game Development Community

spline patch points

by Robert Blanchet Jr. · in Torque Game Engine · 08/06/2002 (10:17 pm) · 4 replies

I'm trying to figure out how to use the drawSplineBeam function in Torque which can be found in splineUtil.cc

I'm confused as to what kinds of values I need for the spline patch points and control points. What I would like to eventually achieve is a custom projectile datablock which renders a random wave animation, using splines, as the projectile, like the Tribes 2 repair pack projectile does.

Any ideas?

#1
08/07/2002 (12:03 am)
I think I have it sort of figured out.
Basically, the beginPos would be the muzzle point of the image representing the gun I want to use. The endPos would be the position on the surface the projectile will touch, which I can find using a RayCast. Whats troubling me is what the other control points will be.

I know that the beginPos and the endPos will be two control points, and judging by the effect in Tribes 2, I think there is only one other control point which would be in-between the beginPos and the endPos along the patch path. I think the x,y value for that middle control point is the eye vector, aka the x,y value of where the cross hair would be pointing.

If this is the case, which I think it might be, then how do i set up the control points when the user moves the cross hair(which creates the 'wave' effect)?
#2
08/07/2002 (7:20 am)
Sigh,
no one ever replies to my threads :/
#3
08/07/2002 (7:44 am)
but i read it :)
(i have no access to source code today)
#4
08/07/2002 (7:36 pm)
OK. I am trying to get a water pistol type of effect as a projectile (that is a stream of water). I have been trying to find a way of doing this... and i think that i have found it. I really should have looked at the rest of the engine.. I have only had it for a few months and have been really busy with homework etc...

Anyways I will play around with the splines and see if i can figure out anything..

If anybody knows how to get this working PLEASE help us..

Cya

Dylan