If I have a flip book placed in the unreal engine fps template how can i make that flip book rotate towards the character
A possible solution is to create a billboard and update the frames manually (rather than having the flipbook do it)
- Create a billboard component and a PaperFlipbook component in the relevant class (enemy class?)
- Drag off the PaperFlipbook and “Get Flipbook”.
- Drag off the return value from “Get Flipbook” and “Get Sprite at Frame”
- Drag off the Billboard and type “Set Sprite”
- Plug in the result of 3. into the input on Set Sprite.
- Create an integer to store the progress of the animation.
- Event tick → Set Sprite node → Increment int.
- Add some way to prevent the int from going higher than the number of frames (drag off “Get Flipbook” and “Get Num Frames” to find out how many this is.
If you want to stick with the flipbook, you can use “Find look at Rotation” plugging in the world location of your flipbook, and the world location of the player as the target. Set the world rotation of the flipbook to the result. You may need to apply a 90 degree rotation on one of the axes to achieve the desired effect.