So the code tells it to go back to default after it stands and the Titan sinks into the ground.
So all I did was make a new Titan and right clicked and changed the "defaults" to my collision size.
Now the code points to my new defaults.
Just wanted to check in and see if is ok, seemed to work on my first try.
Sitting Titan collision problem, fixed ?
Re: Sitting Titan collision problem, fixed ?
Hmm, according to Titan's code the collision is changed when Titan goes up:
I see a problem here when DrawScale is not default, because then the default collision does not match the DrawScale.
Fix: Don't use default collision values but store the current ones and set them after changes:
Code: Select all
state Sitting {
ignores SeePlayer, HearNoise, Bump, TakeDamage;
function Trigger( actor Other, pawn EventInstigator ) {…}
function BeginState() {
bProjTarget = false;
}
GetUp:
bProjTarget = true;
PlayAnim('TGetUp');
FinishAnim();
SetCollisionSize(0, Default.CollisionHeight);
SetPhysics(PHYS_Walking);
DesiredSpeed = 1.0;
Acceleration = vector(Rotation) * AccelRate;
PlayAnim('TWalk001');
FinishAnim();
SetCollisionSize(Default.CollisionRadius, Default.CollisionHeight);
GotoState('Attacking');
Begin:
TweenAnim('TSit', 0.05);
SetPhysics(PHYS_None);
}
Fix: Don't use default collision values but store the current ones and set them after changes:
Code: Select all
OldCollisionRadius = CollisionRadius;
SetCollisionSize(0, CollisionHeight);
…
SetCollisionSize(OldCollisionRadius, CollisionHeight);
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett
Re: Sitting Titan collision problem, fixed ?
Ok, what I did was it's 2.9 % scaled up, and collision has to be 334 I used 336, width was 80.
So on the new Titan those are the new,,collision defaults, I did not, change the default scale in the actor, only the placed one.
And it works perfectly
Is that code just , paste-able ? I like things contained to itself and just work right.
I think just changing the default is ok since I would have to make a new actor anyway, I see a larger Titan, and it stands up walking On the floor. I am in Unreal Gold right now, wish some of that stuff could run on UT.
Thanks, you are correct about the scale thing, so I left it as 1 on the new actor, since 1 would be the new un-scaled of my new collision defaults. So stand or sit, collision stays the same. Yes you would have to make a new actor default collision from the scale used each time. This is just one Titan.
So on the new Titan those are the new,,collision defaults, I did not, change the default scale in the actor, only the placed one.
And it works perfectly
Is that code just , paste-able ? I like things contained to itself and just work right.
I think just changing the default is ok since I would have to make a new actor anyway, I see a larger Titan, and it stands up walking On the floor. I am in Unreal Gold right now, wish some of that stuff could run on UT.
Thanks, you are correct about the scale thing, so I left it as 1 on the new actor, since 1 would be the new un-scaled of my new collision defaults. So stand or sit, collision stays the same. Yes you would have to make a new actor default collision from the scale used each time. This is just one Titan.
Binary Space Partitioning