Jump to content
Official BF Editor Forums

Air Physics Coding


rhysm_08
 Share

Recommended Posts

I am currently in the process of creating a jetpack. I have indeed made it in 3d and got all the IK working and weapons. Where i struggle is coding the air physics. When I add an engine object to the jetpack, it just makes it do flips and random stuff. Currently i can move up and down using a force object but thats about it. I tried adding a tail engine towards the jetpack but it just made it do random front/side flips uncontrollably. Could someone please help steer me in the right direction? What sort of engines should be added and positioning/rotating if that makes a difference? Currently the jetpack has an engine that is disabled, attached to the engine are 4 springs so that it can float (not look bad if the soldier lands).

EDIT: Here is a screenshot of it. Just to show you how small it is as well as to show that the jetpack looks are done just the physics are needed.

jetpack.jpg

Edited by rhysm_08
Link to comment
Share on other sites

Well, it's mostly since it's a really tiny object. The BF2 engine really falls apart on the small and big objects, with both of them breaking the law of conservation of energy in a spectacular way. The only thing I can suggest is that you very, VERY carefully tweak the positions until it starts behaving controllably, because that seems to be the only way to reliably do it.

Link to comment
Share on other sites

1.use a helo rotor material on the physics mesh...take a look at an attatck helo rotor physics mesh.

2.make sure the invisble rotor mesh is above a width of 1m...any smaller the vehicle will flip and do a big stupid...lol.

3.the pivot needs to be in the upper half of the vehicle so the vehicle has hanging/swinging like movement,if in the lower half the vehicle will flip and do a stupid too. :blink:

Edited by BEEX
Link to comment
Share on other sites

Ok thank you. I am really hoping this is possible!! Currently the Rotor is attached to the object (not an invisible object). Do you mean my whole jetpack be the rotor material? Okay i will create a physical rotor, and make it a glass-transaprent material once the physics are coded.

Link to comment
Share on other sites

use a helo armour material for the hull and a helo rotor material on a flat pyramid at the top,so its kinda like a parachute...you dont need to use a helo engine,the rotor mesh is there for balance only.

.

i recently made a t-hawk mav which is around 60cm width,i had to add a 1m width rotor mesh to the top so it wouldnt flip.

basicly the t-hawk is coded like a small helicopter,invisible rotor mesh for overall balance,L and R body wings for roll balance,vertical body wing for additional roll balance,rudder and tail engine for L and R turn,rotor heads for pitch and forward backwarrd and strafe movements.

.

NOTE:when using helo engines on small air vehicles the rotor heads need to be lowered and the tail engine and rudders need to be moved closer to the body,same goes for the body wing and L and R wings...basicly you halve mesurements in comparison to an attack helo...just that bit of info should get you on the right track.

Link to comment
Share on other sites

Allright i have copied the code from the AH1Z to the jetpack. Adding all the engines and wings though the editor. After positioning all the things closer to the jetpack, it still doesn't seem to work. I can only fly it upwards when i hit raise object. When I turn left or right (Roll) it does really quick spins. I can barely control :( It only seems to drop as well, no lift working unfortunetly. Moving the pivot upwards doesn't seem to do much as well. What sort of factors control the Pitch and roll? Could there be a way to tune that down simply? With the pivot, could i just do COl1? Or do I have to do the whole pivot? Changing the pivot causes more uncontrollable flips then the editor crashes for an extremely strange reason after about 10 seconds of flight time. Oh, im not sure if this makes a difference but i have attached a Minigun from the UH-60 Blackhawk. Would that interfer with the physics? Should I add the pyramid to COL1? Or attach to the object itself?

EDIT: I looked at the AH1Z and the pyramid was attached to the COL1. This definetly changed it but it still uncontrollable :(. Could I please send the file it is getting really impossible to code, because you have the T-HAWK perhaps it would be easier to code.

Edited by rhysm_08
Link to comment
Share on other sites

make sure you have mass and a drag modifier...easy mistake to miss those.

just move things around in the editor,once it gets close to being reasonably good physics you can tweak other numbers,you will figure it out mate...be patient. :)

.

btw: kickass idea adding that minigun to the jetpack...nasty!

Edited by BEEX
Link to comment
Share on other sites

Okay thanks for the help. I managed to fly it Somewhat reasonable up and down but not left/right. Currently the mass and drag are from the AH1z (like everything else). Thanks for the tips! And i think the collisoin from the minigun could be interfering with it, i disabled it and got very different physic settings.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...