[?] Missile Ballistics modify

Making or wanting help making your own asset? Check in here
Post Reply
velosong
Posts: 49
Joined: 2007-11-20 00:42

[?] Missile Ballistics modify

Post by velosong »

Guiding missile do change their aimming angle and follow straightly by themselves if they`ve locked on target. But what I do is trying to add ballistics to my missile flying free in air (no aimming), succeed in trajactory change but get trouble in angle change.


here s what i try to do:

Image

By adding wing and setPitchOffset my missile is able to change its track automatically, but strangely the missile dosen`t change its angle when turning.

Image


i `ve set "ObjectTemplate.setPositionOffset " to the missile but seems not work.




could someone tell me where the error is, please ?



Reason for Editing: Tried a new way, succeed,see:http://www.youtube.com/watch?v=cABBMHsM9OU
Last edited by velosong on 2012-05-31 13:57, edited 5 times in total.
Reason: Tried a new way, succeed,see:http://v.youku.com/v_show/id_XMzI3MjY4MDAw.html
Birds Birds Birds
Sniperdog
Retired PR Developer
Posts: 1177
Joined: 2009-02-27 00:06

Re: Missile Ballistics modify question

Post by Sniperdog »

The follow component is the only thing that can actually get the mesh to be pointed in the projectile's direction of travel.

If you want to get a mesh pointed in the natural direction of motion you need to remove the projectile mesh and place it as a tracer mesh.

Take a look at how the mortar and spg projectiles work (weapons/Armament/missiles)


Why exactly are you trying to change direction without a follow component?
Image

Image

Will Stahl aka "Merlin" in the Squad community
Wakain
Posts: 1159
Joined: 2009-11-23 21:58

Re: Missile Ballistics modify question

Post by Wakain »

you're either trying to create a cruise missile or a javelin, right?
Ramjali
Posts: 205
Joined: 2010-07-31 19:28

Re: Missile Ballistics modify question

Post by Ramjali »

Are you going to implement this on the Javelin Missile?

I dont know anything about programming but-
1. couldnt the missle be going too fast for direction change?
2. Why not smoothen the direction change?
3. Why not make it so that, instead of the missile changing direction, why not make it believe that the target is above it, so it changes direction upwards. ??? Then after a set altitude, make it believe that the target is at a horizontal distance, so it changes direction horizontally. THEN you change back to the real target.

I dont know the limitations of the BF2 physics engine but please give my idea a go. :D :D :D :D
velosong
Posts: 49
Joined: 2007-11-20 00:42

Re: Missile Ballistics modify question

Post by velosong »

well,thanks for reply. i will explain although it is a little tedious.


[quote=""'[R-DEV"]Sniperdog;1559414']If you want to get a mesh pointed in the natural direction of motion you need to remove the projectile mesh and place it as a tracer mesh.

Why exactly are you trying to change direction without a follow component?[/quote]


i `ve post a thread weeks before about my AGM114 LOAL firemode(lock on after launch), remeber?
According to the real one, I make 4 fire modes for my AGM114.

AGM114 Guide Direct(wire)
AGM114 laserLOAL-DIR
AGM114 laserLOAL-LO
AGM114 laserLOAL-Hi

here`s the real AGM114 trajectory .


Image
Image
Image

The first section of the trajectory is climbing up, on the top of the curve is the point where and when the missile start tracking. However, if i add follow component to missile in bf2, it will go to the target directly without any climbing.

i set tracking delay to missile so that it will has a free-fly section in the first. Additionally, setting Wing function in section 1 makes it has climbing ablility. That`s how i re-create the realy AGM114 trajectory in bf2.

By your way, my missile can point in the correct direction while it turns. But a problem which is more strange comes out:
There are 2 missiles being fired when i launch one missile. It is nothing about the fire rate of the GFA in AH1z.

In my screenshots, you can see them flying in the same time, response to target in the same way, but have a tiny different trajectory. One has mesh visible while the other dosen`t.


Image

Image

Image




Taking regard of the clues I guess one is the hellfire projectile mesh, the other is the hellfire tracer mesh. But i do remove the projectile mesh.

Besides, after starting tracking, the missile will slow down evidently, i am still confused about that. It will not appear after removing Wing component, however Wing is the key factor of my AGM114_hellfire_laserLOALDIR


here s how i did.i use the spg-9 of PR as a reference,

1, remove the geometry of AGM114_hellfire_laserLOALDIR, but retain the seek,follow,damage and Wing component of it.

2, create new tracer missile of the one above, called AGM114_hellfire_laserLOALDIR_tracer. Add this tracer missile to AGM114_hellfire_laserLOALDIR by code

3, set the mesh to the tracer missile,


At the end of this reply is my code, you can check it if you have time. Waitting for you help, please.






rem--------------------------
[quote="Wakain""]you're either trying to create a cruise missile or a javelin, right?[/quote]
Ramjali wrote: 1. couldnt the missle be going too fast for direction change?
2. Why not smoothen the direction change?
3. Why not make... :D :D :D :D
The laser guiding missile basing on LaserTarget set by other equipment。As i know, only one LaserTarget is allow to set, or there will be chaos in the scene. TTunique mode will work in the way of you said, but I have no idea about how combining it with TTLaser. I think it is much more difficult than add physicis to weapon.


If this modify succeed, it can be used on many missile weapon evidently. I `m trying my best to recreate the Cobra working in the game.
BY THE WAY , I can`t add attachment even picture here, Is that restrictions or not be allowed?






rem--------------------------------------------------------------------------

agm114_hellfire_laserLOALDIR.con code attached here



agm114_hellfire_laserLOALDIR.tweak code attached here




agm114_hellfire_laserLOALDIR_tracer.con



------------------
Last edited by velosong on 2011-10-24 11:49, edited 13 times in total.
Reason: Codeing failed, Try to make it someday later.
Birds Birds Birds
Sniperdog
Retired PR Developer
Posts: 1177
Joined: 2009-02-27 00:06

Re: [?] Missile Ballistics modify

Post by Sniperdog »

Well what is actually happening here is the tracer which has a mesh has to constantly try and track the projectile itself, which can look a little weird sometimes.

Two things you can try doing are:

1. Remove the effect from the projectile and add template it to the tracer (not sure if you can do this)

2. Adjust the position of the effect so it looks better.


Other then that you will simply have to compromise. For what you are doing to the best of my knowledge you will either need to live with a double tracer weird looking effect or a projectile that isn't facing the right way.

In PR whenever we do the above method it is for when we have a ballistically fired projectile that needs a mesh, in which case we simply don't use a trail effect.
Image

Image

Will Stahl aka "Merlin" in the Squad community
velosong
Posts: 49
Joined: 2007-11-20 00:42

Re: [?] Missile Ballistics modify

Post by velosong »

thanks, i will try it right now
Birds Birds Birds
Post Reply

Return to “PR:BF2 Community Modding”