of     1   

sk8ercool456
#58483577Thursday, November 24, 2011 6:40 AM GMT

BodyGyro doesn't seem to want to cooperate with BodyForce or BodyPosition, so I need a different method. Any ideas?
RoflBread
#58484489Thursday, November 24, 2011 7:20 AM GMT

There is always rocket propulsion...I think. http://wiki.roblox.com/index.php/RocketPropulsion
RoflBread
#58484667Thursday, November 24, 2011 7:26 AM GMT

But why shouldn't a bodyGyro work with bodyForce? Set it so the gyro makes it face where you want to go, and have bodyForce apply force on the rocket's lookVector.
sk8ercool456
#58484791Thursday, November 24, 2011 7:31 AM GMT

@Rofl I don't know. It just seems like BodyGyro never works with other body objects.
sk8ercool456
#58485013Thursday, November 24, 2011 7:42 AM GMT

Nevermind, I got it with BodyGyro+BodyForce. I just had to set the maxTorque of the BodyGyro to a ridiculously huge number.
sk8ercool456
#58485238Thursday, November 24, 2011 7:52 AM GMT

Works even better with BodyPosition :)
TwiIight
#58488105Thursday, November 24, 2011 12:43 PM GMT

while true do wait() missile.CFrame = CFrame.new(missile.Position,Target.Position)*CFrame.new(0,0,1) end
crazyman32
#58490147Thursday, November 24, 2011 2:13 PM GMT

BodyGyro and BodyVelocity together are the two best objects for anything flying
popinman322
#58490239Thursday, November 24, 2011 2:15 PM GMT

Adding to what crazyman said, don't forgot the make sure that part's front side is actually facing the front. ~+[CROOKITY BANDED SNAKES]+~
pokemon771
#58490250Thursday, November 24, 2011 2:15 PM GMT

^ I would do what crazyman says cause HE would know. :D btw I LOVE your Perilous skys game. :D
crazyman32
#58490350Thursday, November 24, 2011 2:18 PM GMT

Now making the missile track is a whole different story. Yes, making it simply follow the target isn't that hard. Just point it toward the target. But making it shoot in the targets PREDICTED path takes some work. Can be done with speed/dist/time equations.
popinman322
#58490623Thursday, November 24, 2011 2:25 PM GMT

-- Launch up here, assuming that Missile is definined while Missile.Parent == Workspace do -- Assuming that TargetTorso is defined BodyGyro.cframe = TargetTorso.CFrame BodyPosition.position = (TargetTorso.CFrame*CFrame.new(0,0,-5)).p -- Keeps the missile target 5 studs in front of the Torso wait() end Not fancy, but still not the worst someone could do. ~+[CROOKITY BANDED SNAKES]+~
sk8ercool456
#58494252Thursday, November 24, 2011 3:37 PM GMT

I used BodyPosition and BodyGyro. I just use a loop to keep the BodyGyro pointed at the target and to make the BodyPosition's position a certain number of studs away from the tip of the missile.
crazyman32
#58495442Thursday, November 24, 2011 3:57 PM GMT

Only problem is that you can't really control the speed of a BodyPosition object. And if you want the scary truth, the missile scripts in Perilous Skies are about 300 lines of code.
sk8ercool456
#58495787Thursday, November 24, 2011 4:02 PM GMT

@crazy You can control the speed. You just have to make the BodyPosition's position further ahead. BodyPosition.position = missile.Position + missile.CFrame.lookVector --Very slow BodyPosition.position = missile.Position + missile.CFrame.lookVector * 100 --Super fast
crazyman32
#58500678Thursday, November 24, 2011 5:20 PM GMT

Aye, but that's not precise since it sort of 'tweens' the position. It will work, but I still favor the BodyVelocity movements
sk8ercool456
#58500897Thursday, November 24, 2011 5:24 PM GMT

BodyPosition makes it easier to make it realistic, because it automatically includes acceleration.

    of     1