Problem *SOLVED* Can't create vessel in the right place

johnnymanly

Donator
Donator
Joined
Mar 17, 2008
Messages
179
Reaction score
116
Points
43
Location
Southwest Pennsylginia
Website
sites.google.com
I've made an alternate PL cargo module for the ShuttleA and I want to create a deflated chute, as a separate vessel, upon ground contact.
If I create it using "get_groundcontact()" it's created many meters away and underground.
Screenshot_20260107_213459.jpg
If I do it using "clbk_consumebufferedkey()" it's fine.
Screenshot_20260107_213305.jpg
I've coded it this way:
Code:
local vs = vi:get_rawstatus(1)
    local t = vs:get()
    local ofs = vi:get_meshoffset(0)
    t.rpos = vi:local2rel(ofs)
    vs:set(t)
    oapi.create_vessel("RumpledChute", "RumpledChute", vs)
and just plain:
Code:
local vs = vi:get_rawstatus(1)
oapi.create_vessel("RumpledChute", "RumpledChute", vs)
Both produce the same result.
With a keystroke it's fine, with "get_groundcontact()" it's not.
Anyone have an idea what I'm doing wrong?
 
Back
Top