0 votes

hello World!

I try to watch a video on a mesh plane object, so i write this :

extends MeshInstance

var stream = preload("res://_Videos/UndeadMurdererTV.ogv")

func _ready():
    var player = VideoPlayer.new()
    player.set_stream(stream)

    add_child(player)

    var material = SpatialMaterial.new()

    var texture = material.albedo_texture
    texture = player.get_video_Texture()

    material.albedo_texture = texture
    material.set_flag(material.FLAG_UNSHADED, true)
    set_material_override(material)
    player.play()

    pass

But i have an error : Invalid call. Nonexistent function 'getvideoTexture' in base 'VideoPlayer'.

Why is wrong and how to do that I want ?

in Engine by (57 points)

Have you tried to use player.get_video_texture() with a lower case t?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories