SDK Question some questions about RMS toggle

weiqi

New member
Joined
Feb 20, 2009
Messages
23
Reaction score
0
Points
0
I have referred to the MG_Atlantis.cpp for the RMS toggle operations when I developed my own spaceship SKY. Finally I'm lucky to realise the toggle and release operation. However, when the attachment point in the RMS comes clear to the attachment on the target, the operation isn't successive. That is to say, the target "jump" to the RMS, I don't know why, can you give me some advices.

(Since I'm not good at C++, so it is a little hard for me to read the MG_Atlantis files, especially the "TogglegGrapple" function for my RMS. So, I will be honored to be given some simple example on the RMS operation.
Thanks very much!)
 

tblaxland

O-F Administrator
Administrator
Addon Developer
Webmaster
Joined
Jan 1, 2008
Messages
7,320
Reaction score
25
Points
113
Location
Sydney, Australia
I assume you are referring to the effect where the attachment point on a child object jumps to the parent attachment point position when you you call the AttachChild function? If so, then that is expected and normal behaviour. The default Atlantis has it too but it is harder to pick because it will only attach childs within a certain range.

You have two options. One, you could make sure you only call AttachChild on child attachment points that are close (your call on what you define as "close") to your parent attachment. Two, you could move the parent attachment to the same global location as the child attachment the animate the attachment point back to its original location over some time period - this would have a mysterious force "tractor-beam" type effect to it. Here is a video of one I prepared earlier:
http://home.iprimus.com.au/stblaxland/orbiter/pod_capture_20090301.wmv

I can't give you the code because I was doing that work for another developer but you can see the concept is sound. For more on animating attachment points, see how the default Atlantis code moves the RMS end effector attachment point using LOCALVERTEXLIST.
 

weiqi

New member
Joined
Feb 20, 2009
Messages
23
Reaction score
0
Points
0
Thanks for your help! I have taken your advice and that works well! Thanks again for your kindness!
 
Top