Hello, there good people.
I tried my best to make it reader-friendly.
What I have achieved so far.
I have been practicing python in the unreal engine for a couple of weeks now.
What I am trying to do is, suppose I have a cube blueprint and I want to move it from point A(0,0,0) to point B(0,300,0), smoothly in the viewport itself.
What I want to achieve is
I was able to move the blueprint from point A(0,0,0) to point B(0,300,0) directly. Using the below code
*actors = el.get_all_level_actors()*
*for actor in actors:*
* if actor.get_actor_label() == 'cube_bp':*
* actor.set_actor_location(ue.Vector(0,300,0), False, False)*
I tried using a loop that increments the y-axis value by 1 and ends at 300. this doesn’t work, it directly moves the actor to the final point which is (0,300,3).
*actors = el.get_all_level_actors()*
*for actor in actors:*
* if actor.get_actor_label() == 'cube_bp':*
* for i in range(1, 300, 1):*
* actor.set_actor_location(ue.Vector(0,i,0), False, False)*
I also tried refreshing the viewport after every iteration, that also didn’t work.
*actors = el.get_all_level_actors()*
*for actor in actors:*
* if actor.get_actor_label() == 'cube_bp':*
* for i in range(1, 300, 1):*
* actor.set_actor_location(ue.Vector(0,i,0), False, False)*
*vpbl.refresh3d_editor_viewport()*
Is there any way to do what I want to do?
Note: I am new to this forum, please consider my mistakes.
Thank you