Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualratrace135

Posted 16 March 2013 - 07:41 AM

Ahh yes. For the pawn mesh, if you're extending from both UTPawn and UTBot, you have to deal with UTFamilyInfo... There are two things you can do. One would be to extend your own class from UTFamilyInfo and set that as the CurrCharClassInfo in your pawn. The other choice would be to overwrite the family info function in your pawn if you don't want to deal with family info at all, like

simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)
{
	//Ignoring family info
}

 

As for animations, I can't see if you're calling any animations. The typical way of getting the pawn to start playing animations is to, in the controller/bot class, set the player's physics to PHYS_Falling by calling Pawn.SetMovementPhysics() when the controller class has possessed a pawn (which has already been done in UTBot). However, that only gets animations playing because of the animtree. So if you wanted to play an idle animation on startup for example, you'd need to directly call the animation.

//We're in the bot class
function Possess( Pawn aPawn, bool bVehicleTransition )
{
   super.Possess( aPawn, bVehicleTransition );

   aPawn.Mesh.PlayAnim( BirdPawn(aPawn).IdleAnim, , True );     //Loops a hypothetical IdleAnim
}

 

Finally, for the player hovering above the ground, that would most likely be that the collision cylinder and the mesh aren't aligned. Play the level and in the console, type "show collision". What you'll probably see is the collision cylinder touching the ground and the mesh hovering somewhere above that. To fix that, you'll need to modify the WPawnSkeletalMeshComponent's Z Translation in the DefaultProperties. UTPawn has it set to 8, but you'll have to change that number to work for your mesh, depending on where its pivot point is.


#1ratrace135

Posted 16 March 2013 - 07:40 AM

Ahh yes. For the pawn mesh, if you're extending from both UTPawn and UTBot, you have to deal with UTFamilyInfo... There are two things you can do. One would be to extend your own class from UTFamilyInfo and set that as the CurrCharClassInfo in your pawn. The other choice would be to overwrite the family info function in your pawn if you don't want to deal with family info at all, like

simulated function SetCharacterClassFromInfo(class<UTFamilyInfo> Info)
{
	//Ignoring family info
}

 

As for animations, I can't see if you're calling any animations. The typical way of getting the pawn to start playing animations is to, in the controller/bot class, set the player's physics to PHYS_Falling by calling Pawn.SetMovementPhysics() when the controller class has possessed a pawn (which has already been done in UTBot). However, that only gets animations playing because of the animtree. So if you wanted to play an idle animation on startup for example, you'd need to directly call the animation.

//We're in the bot class
function Possess( Pawn aPawn, bool bVehicleTransition )
{
   super.Possess( aPawn, bVehicleTransition );

   aPawn.Mesh.PlayAnim( BirdPawn(aPawn).IdleAnim, , True );     //Loops a hypothetical IdleAnim
}

Finally, for the player hovering above the ground, that would most likely be that the collision cylinder and the mesh aren't aligned. Play the level and in the console, type "show collision". What you'll probably see is the collision cylinder touching the ground and the mesh hovering somewhere above that. To fix that, you'll need to modify the WPawnSkeletalMeshComponent's Z Translation in the DefaultProperties. UTPawn has it set to 8, but you'll have to change that number to work for your mesh, depending on where its pivot point is.


PARTNERS