View unanswered posts | View active topics It is currently Fri Apr 19, 2024 5:51 am



Reply to topic  [ 8 posts ] 
 Rockets are affected by the actor's current vector 
Author Message
User avatar

Joined: Sat Jun 23, 2012 2:03 pm
Posts: 340
Location: At home, drinking some tears (probably mine)
Reply with quote
Post Rockets are affected by the actor's current vector
So if you're full throttle on that jetpack, or in a quick decent, rockets fired from RPG-7s, or missile launchers, or the Halo Rocket Launcher, or rockets in general (I believe) are affected by that vector, and either curve upwards or downwards dramatically, usually nowhere near the target you're aiming for.

With some skill, you could aim a bit differently to compensate for that, but I was just wondering if there was a way to prevent or reduce the amount the actor's vector affects the rocket's.


Tue Sep 04, 2012 1:37 pm
Profile
User avatar

Joined: Sat Sep 01, 2012 6:27 am
Posts: 50
Location: Australia
Reply with quote
Post Re: Rockets are affected by the actor's current vector
I'm not sure how to do that but please PM me when you find out because it happens with most big weapons like lazer canons as well not just rocket weapons.
It is very anoying when you are flying because even if you are only moving the slightest little bit it shoots way off.


Tue Sep 04, 2012 2:07 pm
Profile
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Rockets are affected by the actor's current vector
Well, the thing is that shots fired inherit the actors velocity, which could become problematic with the rocket launcher, since it has the following two properties:
1. It turns to orient itself to its velocity vector.
2. It accelerates towards where it's facing.

Thus, if you're flying backwards faster than the rocket is initially launched, it will actually fly backwards (and if it didn't have the neat property of not hitting its wielder, your face would explode). The easiest way around this is to set OrientToVel = 0, since that'll make it keep the direction it was fired in, regardless of its actual velocity. This also makes for some totally badass curving shots if you know what you're doing.

if you ask me then OrientToVel should only ever be used for inert projectiles


Tue Sep 04, 2012 4:02 pm
Profile WWW
Forum Moderator
User avatar

Joined: Fri Feb 02, 2007 3:53 pm
Posts: 1896
Location: in my little gay bunker
Reply with quote
Post Re: Rockets are affected by the actor's current vector
While the orient to velocity variable is the culprit of problem with rotating rockets. The rockets inheriting your velocity is the only realistic approach to this problem and you will have to compensate for this.


Tue Sep 04, 2012 4:42 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Rockets are affected by the actor's current vector
Whether meant as a feature or not, I like it. A nice way to stop people from making cheap shots.


Tue Sep 04, 2012 7:55 pm
Profile
User avatar

Joined: Sat Jun 23, 2012 2:03 pm
Posts: 340
Location: At home, drinking some tears (probably mine)
Reply with quote
Post Re: Rockets are affected by the actor's current vector
Hmm, it would be great if there was a way to turn down the inheritance instead of just turning it off (cause I agree with Gotcha).

Thanks for answering!


Tue Sep 04, 2012 10:07 pm
Profile
DRL Developer
DRL Developer

Joined: Tue Aug 11, 2009 5:09 am
Posts: 395
Reply with quote
Post Re: Rockets are affected by the actor's current vector
AndyChanglee wrote:
Hmm, it would be great if there was a way to turn down the inheritance instead of just turning it off (cause I agree with Gotcha).
You can attach a script to the missile that does that. The "inherit" variable in the script below sets how much of the original velocity (actor velocity plus missile velocity) you want to keep.

Code:
function Create(self)
   local inherit = 0.67
   local fireVelocity = 40
   self.Vel = self.Vel*inherit + self:RotateOffset(Vector(fireVelocity, 0))*(1-inherit)
end

Since this essentially circumvents the laws of physics it looks kind of strange IMO.


Wed Sep 05, 2012 8:53 am
Profile
User avatar

Joined: Sat Jun 23, 2012 2:03 pm
Posts: 340
Location: At home, drinking some tears (probably mine)
Reply with quote
Post Re: Rockets are affected by the actor's current vector
I guess so, but its definately weird when it happens while you're jetpacking upwards or backwards.

I might just keep things the way it is, thanks for the code, just in case!


Wed Sep 05, 2012 10:20 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.063s | 17 Queries | GZIP : Off ]