Scripting a Hide ability

derkoi

New member
Hi,

I’d like to be able to hide in a bed or in cupboards in my game, whilst hidden I’d like the player to be able to look around, if the try to walk they will leave the hiding place.

I’ve watched the Crawl ability tutorial but I’m not sure the best way to continue. Any suggestions please? Thanks
 
Starting with the crawl ability is a good start. You'd play a starting animation to get into position, then prevent the ability from moving the character by overriding UpdateMovement, and then checking CharacterLocomotion.InputVector to determine if the character should leave the hiding spot. When this occurs you'd then play an ending animation.
 
That would be one way, or you could use root motion to have the animation drive the movement with the starting animation.
 
Top