Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | johnburkert |
Is it possible to render video on a sprite or quad? If so, is there an example?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | johnburkert |
Is it possible to render video on a sprite or quad? If so, is there an example?
Reply From: | funabab |
This can be achieved by using a viewport node.
Add a videoplayer node as a child of a viewport node and use the viewport texture as the texture of the sprite.
You can check the Viewport demos or a demo scene i have prepared (3.x) Dropbox - ViewportVideoDemo.rar - Simplify your life
Thanks for the reply. I ended up going with this:
var video = VideoPlayer.new()
video.stream = load("res://video.ogv")
var sprite = Sprite.new()
sprite.add_child(video)
sprite.set_texture(video.get_video_texture())
johnburkert | 2018-04-25 18:20