There appear to be a couple of miscalculations at MakeBaby:
Quotelocal function MakeBaby(inst)
--local angle = inst.Transform:GetRotation() / DEGREES
local angle = (inst.Transform:GetRotation() + 180) * DEGREES
local prefab = inst.components.combat:HasTarget() and math.random() < .333 and "spider_warrior" or "spider"
local spider = inst.components.lootdropper:SpawnLootPrefab(prefab)
if spider ~= nil then
local rad = spider:GetPhysicsRadius(0) + inst:GetPhysicsRadius(0) + .25
local x, y, z = inst.Transform:GetWorldPosition()
--spider.Transform:SetPosition(x + rad * math.cos(angle), 0, z + rad * math.sin(angle))
spider.Transform:SetPosition(x + rad * math.cos(angle), 0, z - rad * math.sin(angle))
Since the animation has no faces, this doesn't fully get rid of the issue, but at least the offset will be consistent with her rotation.
P.S. This part of her poop stategraph is not necessary for dedicated servers as it always rotates her to 0.7853975:
QuoteState{
name = "poop_pre",
tags = {"busy", "nointerrupt"},onenter = function(inst, cb)
inst.Physics:Stop()
inst.components.locomotor:Stop()
local angle = TheCamera:GetHeadingTarget()*DEGREES -- -22.5*DEGREES
inst.Transform:SetRotation(angle / DEGREES)
- 6
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now