Jump to content

Engine gimbal only works in 1 direction


Recommended Posts

I'm working on some engine configs, and found that the gimbaling only works in one direction.

Code here:

	MODULE
	{
	 	gimbalResponseSpeed = 3 // SAS really hates this, fasten your seatbelt this ship is gonna get FUNKEY
	 	useGimbalResponseSpeed = true
		name = ModuleGimbal
		gimbalTransformName = Reactor
		gimbalRange = 7

		// Added the following to see if it would help, it did not
		enableYaw = true
		enablePitch = true
		enableRoll = true
	}

Not sure what else to look at any ideas?

I'm seeing this in multiple engines.  The models are old, not sure if that would be a factor.  My understanding was that the ModuleGimbal simply finds the transform and moves it in the appropriate direction.

Link to comment
Share on other sites

28 minutes ago, Shadowmage said:

Is the gimbal transform orientation setup properly?  IIRC in recent versions, they need the same orientation as an engine thrust transform (Z+ = exhaust direction).

I don't know, I'll have to look at it in Blender :-(

Is it possible in code to change the orientation of a transform?

Link to comment
Share on other sites

Just now, linuxgurugamer said:

Do you think it can be done in Blender? importing and then exporting?

In theory yes.  I'm not super familiar with the mu export/import plugin though and I'm not sure if anything else would have to be rebuilt.

Link to comment
Share on other sites

Well you'd need everything parented under the gimbal transform to stay there, otherwise it won't do anything.  In theory you could rotate the gimbal transform to the correct orientation then rotate all of its children back, but you're probably better off trying the import/export thing.

Link to comment
Share on other sites

11 minutes ago, linuxgurugamer said:

can  you remove a transform from an object and then add it to another object?

Yes.  I'd be cautious of writing code just for this one off though.  You have to distribute and maintain it.  Even if re-exporting the model is initially more work it might be worth it.

Link to comment
Share on other sites

4 minutes ago, blowfish said:

Yes.  I'd be cautious of writing code just for this one off though.  You have to distribute and maintain it.  Even if re-exporting the model is initially more work it might be worth it.

Well, it's 4 engines here, and then at least one in KWRocketry which I noticed this morning (maybe more).  It could be a useful little mod to help adapt old parts

Link to comment
Share on other sites

I've had decent luck importing models into Blender with the .mu import/export plugin.

A few notes though -- ALL of the transform orientations will be screwed up.  You'll pretty much have to re-rig/re-orient all of the meshes.  Something to do with the way the .mu plugin tries to convert and swap Y and Z axis'.  (maybe I have an old version of the plugin?)

Smoothing data will also most likely be lost.  Models that I've imported into blender had to have their edge smoothing redone entirely.  It seems like the .mu import/export tool doesn't keep split edges/normals.

Parts with animations -- ugg... you'll have to re-animate them after you fix the transform orientations (the animations will work as-imported; but as soon as you start fixing transform orientations, the animations will go all sorts of sideways).

 

I'm with @blowfish though -- trying to fix them through code is possible, but going a bit overboard.  The 'proper' way to fix them is to fix the problem in the model itself (in my opinion of course).  And once you have them all fixed up in Blender... you've got a nice ready-to-edit/alter model file ready for the future.


 

Link to comment
Share on other sites

18 hours ago, Shadowmage said:

I've had decent luck importing models into Blender with the .mu import/export plugin.

A few notes though -- ALL of the transform orientations will be screwed up.  You'll pretty much have to re-rig/re-orient all of the meshes.  Something to do with the way the .mu plugin tries to convert and swap Y and Z axis'.  (maybe I have an old version of the plugin?)

Smoothing data will also most likely be lost.  Models that I've imported into blender had to have their edge smoothing redone entirely.  It seems like the .mu import/export tool doesn't keep split edges/normals.

Parts with animations -- ugg... you'll have to re-animate them after you fix the transform orientations (the animations will work as-imported; but as soon as you start fixing transform orientations, the animations will go all sorts of sideways).

 

I'm with @blowfish though -- trying to fix them through code is possible, but going a bit overboard.  The 'proper' way to fix them is to fix the problem in the model itself (in my opinion of course).  And once you have them all fixed up in Blender... you've got a nice ready-to-edit/alter model file ready for the future.


 

I do agree, except that I don't know how to fix it in Blender/unity, etc.  Code I understand, graphics programs I don't.

So unless someone can help me, I may just have to write a little plugin for this

 

Link to comment
Share on other sites

While this is going to have to wait until I finish another project, I would envision it to be fairly simple:

  1. Remove transform from mode
  2. Add new transform, use the engine thrust transform (?) to do the proper direction
  3. Add transform to new transform.
  4. Use new transform for gimbaling

I know, simple in theory.  Which is why it will wait a bit

Link to comment
Share on other sites

  • 2 weeks later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...