I need to create an actor that will roll across the ground at a constant direction, and then when it bumps into a wall will roll the other way. If it reaches an edge it will fall off but keep moving forward. If it hits a pawn it should either pass through it or damage it, depending upon certain options. This is for a weapon effect, but I am extending it from actor because there is too much stuff in projectile to remove to get this to work the way I need.
Now I don't think I'm going to have any problems with making it change directions when it hits a wall, since there is already a HitWall function in actor. But I am a little unsure about how to make it actually roll.
I can create a cylinder collision easily enough, and one can add a velocity to the actor, but that would just have it move. It would be too much of a headache to try to create a rotation and time it to match the object's speed.
I could imagine this being treated like a standard physics actor, with exception to the fact that I don't want the actor to ever slow beneath a certain rate, and I want it to move only on a 2D plane. But I don't know how to have this actor roll according to existing physics calculations, let alone make the alterations I would need.
Any thoughts?



Reply With Quote

Bookmarks