Game Development Community

Animated sprite, can you adjust collision per frame?

by Steve De George · in Torque X 2D · 02/17/2010 (11:21 am) · 3 replies

If I want my player to float, and sort of bob up and down when he's idle, I figured I would just animate this within the sprites available area. But then I realized that the collision isn't going to change with how I animate.

How you all get around this?

#1
02/17/2010 (6:40 pm)
You have to implement the OnFrameChangeDelegate and set the collision poly you need.
#2
02/17/2010 (7:55 pm)
Yep - there is no built in support for specifying per animation frame collisions in the editor or in the engine, so you have to do it yourself.
#3
02/18/2010 (12:55 am)
http://www.torquepowered.com/community/forums/viewthread/69907