danimal'
11-10-2009, 09:29 PM
So I'm pulling out my hair, I've learned to do things super simple to figure out what's wrong but I have no idea why this does nothing. Below is a super simple modified weapon, that upon firing should be spawning a RB_Constraint and attaching my character. I literally pulled this wholesale from the Whizzle creation docs (where they constrain the player sphere to 2d), seen here: http://www.udk.com/elements/downloads/Whizzle_Creation_Document_1_2.pdf
- It is firing, I can tell b/c I can push rigid bodies around a level with it b/c I set dmg and dmg type which is being used as an impulse on the rigid body.
- It does get past the spawning function, that's why I set ammocount=10, so I have a visual clue that it does get there.
- Yet there is no constraint or constraining action whatsoever.
Weapon:
class UTWeap_Test extends UTWeapon;
simulated function InstantFire()
{
super.InstantFire();
SetFlashLocation(Location);
CustomSpawnConstraint();
}
simulated function CustomSpawnConstraint()
{
local RB_ConstraintActor TwoDConstraint;
TwoDConstraint = Spawn(class'RB_ConstraintActorSpawnable', , '', Location, rot(0,0,0));
TwoDConstraint.ConstraintSetup.LinearYSetup.bLimit ed = 0;
TwoDConstraint.ConstraintSetup.LinearZSetup.bLimit ed = 0;
TwoDConstraint.ConstraintSetup.bSwingLimited = true;
TwoDConstraint.InitConstraint( UTPlayerController, None );
Ammocount=10;
}
EDIT: I figured out that I'm failing to set the Constraint to my player character. I thought I should use UTPlayerController, but that doesn't seem to work. Any ideas?
Also, anyone know why: show constraints isn't working from the command line? It'll even tell you in-engine that it's on except that... it's clearly not.
danimal
- It is firing, I can tell b/c I can push rigid bodies around a level with it b/c I set dmg and dmg type which is being used as an impulse on the rigid body.
- It does get past the spawning function, that's why I set ammocount=10, so I have a visual clue that it does get there.
- Yet there is no constraint or constraining action whatsoever.
Weapon:
class UTWeap_Test extends UTWeapon;
simulated function InstantFire()
{
super.InstantFire();
SetFlashLocation(Location);
CustomSpawnConstraint();
}
simulated function CustomSpawnConstraint()
{
local RB_ConstraintActor TwoDConstraint;
TwoDConstraint = Spawn(class'RB_ConstraintActorSpawnable', , '', Location, rot(0,0,0));
TwoDConstraint.ConstraintSetup.LinearYSetup.bLimit ed = 0;
TwoDConstraint.ConstraintSetup.LinearZSetup.bLimit ed = 0;
TwoDConstraint.ConstraintSetup.bSwingLimited = true;
TwoDConstraint.InitConstraint( UTPlayerController, None );
Ammocount=10;
}
EDIT: I figured out that I'm failing to set the Constraint to my player character. I thought I should use UTPlayerController, but that doesn't seem to work. Any ideas?
Also, anyone know why: show constraints isn't working from the command line? It'll even tell you in-engine that it's on except that... it's clearly not.
danimal